public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] procfs: fix rcu-lock/unlock in proc_reg_open() and proc_reg_release()
@ 2013-03-07  7:21 Konstantin Khlebnikov
  2013-03-13  0:06 ` Peter Hurley
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2013-03-07  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Nathan Zimmer

fix for a21813be23329e2788164eab532e79cb0e513cfc (linux-next)
"procfs: improve scaling in proc"

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Nathan Zimmer <nzimmer@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 fs/proc/inode.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6cccc4d..073846c 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -352,7 +352,7 @@ static int proc_reg_open(struct inode *inode, struct file *file)
 	atomic_inc(&pde->pde_users);
 	open = fops->open;
 	release = fops->release;
-	rcu_read_lock();
+	rcu_read_unlock();
 
 	if (open)
 		rv = open(inode, file);
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] procfs: fix rcu-lock/unlock in proc_reg_open() and proc_reg_release()
  2013-03-07  7:21 [PATCH linux-next] procfs: fix rcu-lock/unlock in proc_reg_open() and proc_reg_release() Konstantin Khlebnikov
@ 2013-03-13  0:06 ` Peter Hurley
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Hurley @ 2013-03-13  0:06 UTC (permalink / raw)
  To: Konstantin Khlebnikov; +Cc: linux-kernel, Andrew Morton, Nathan Zimmer

On Thu, 2013-03-07 at 11:21 +0400, Konstantin Khlebnikov wrote:
> fix for a21813be23329e2788164eab532e79cb0e513cfc (linux-next)
> "procfs: improve scaling in proc"
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
> Cc: Nathan Zimmer <nzimmer@sgi.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>

Konstantin,

Thanks for fixing this. Now -next boots once again :)

Regards,
Peter Hurley


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-13  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07  7:21 [PATCH linux-next] procfs: fix rcu-lock/unlock in proc_reg_open() and proc_reg_release() Konstantin Khlebnikov
2013-03-13  0:06 ` Peter Hurley

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