Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracefs: fix a leak in eventfs_create_events_dir()

If we have LOCKDOWN_TRACEFS, the function bails out - *after*
having locked the parent directory and without bothering to
undo that. Just check it before tracefs_start_creating()...

Fixes: e24709454c45 "tracefs/eventfs: Add missing lockdown checks"
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 798a4016 c460192a

+2 -1
+2 -1
fs/tracefs/event_inode.c
··· 757 757 const struct eventfs_entry *entries, 758 758 int size, void *data) 759 759 { 760 - struct dentry *dentry = tracefs_start_creating(name, parent); 760 + struct dentry *dentry; 761 761 struct eventfs_root_inode *rei; 762 762 struct eventfs_inode *ei; 763 763 struct tracefs_inode *ti; ··· 768 768 if (security_locked_down(LOCKDOWN_TRACEFS)) 769 769 return NULL; 770 770 771 + dentry = tracefs_start_creating(name, parent); 771 772 if (IS_ERR(dentry)) 772 773 return ERR_CAST(dentry); 773 774