mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] procfs: missing rcu unlock in proc_reg_release
@ 2013-03-05 13:55 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2013-03-05 13:55 UTC (permalink / raw)
  To: akpm; +Cc: viro, ebiederm, nzimmer, linux-kernel, Sasha Levin

Commit "procfs: improve scaling in proc" forgot to unlock rcu read lock
if the proc file didn't have ops struct.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 fs/proc/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6cccc4d..d9292ac 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -400,6 +400,7 @@ static int proc_reg_release(struct inode *inode, struct file *file)
 	rcu_read_lock();
 	fops = rcu_dereference(pde->proc_fops);
 	if (!fops) {
+		rcu_read_unlock();
 		/*
 		 * Can't simply exit, __fput() will think that everything is OK,
 		 * and move on to freeing struct file. remove_proc_entry() will
-- 
1.8.1.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-05 13:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 13:55 [PATCH] procfs: missing rcu unlock in proc_reg_release Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®