procfs: fix rcu-lock/unlock in proc_reg_open() and proc_reg_release()
PATCH 1/1 procfs: fix rcu-lock/unlock in proc_reg_open() and proc_reg_release()
fix for a21813be23329e2788164eab532e79cb0e513cfc (linux-next) "procfs: improve scaling in proc"
Signed-off-by Konstantin Khlebnikov <[email protected]>
Cc Nathan Zimmer <[email protected]>
Cc Andrew Morton <[email protected]>
--- fs/proc/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/proc/inode.c +2 -1
@@ -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
Quoted 6 lines · Konstantin Khlebnikov
fix for
a21813be23329e2788164eab532e79cb0e513cfc(linux-next) "procfs: improve scaling in proc"Signed-off-by Konstantin Khlebnikov <[email protected]>Cc Nathan Zimmer <[email protected]>Cc Andrew Morton <[email protected]>
Konstantin,
Thanks for fixing this. Now -next boots once again :)
Regards,
Peter Hurley