Messages in this thread | | | Date | Fri, 21 Nov 2003 14:46:30 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] better locking in fs/proc/generic.c (bug 1552) |
| |
Nathan Lynch <nathanl@austin.ibm.com> wrote: > > Hi- > > I have been experiencing various oopses in the procfs code when rapidly > adding and removing /proc entries.
I doubt if this particularly surprises anyone.
> It seems that the main problem is > lack of proper locking around code that traverses or modifies the > proc_dir_entry tree. There is also the matter of proc_kill_inodes() > clearing the file pointer's f_op, which caused oopses in vfs_read() in > my testing. > > I have followed the example of proc_lookup() and used > lock_kernel/unlock_kernel around critical sections. I'm not much of a > filesystem person, so I would appreciate a review of the patch from > folks more knowledgeable. I have been testing the code on a couple of > dual processor machines (i386 and ppc64) without incident.
The correct lock to use is i_sem on the directory which is subject to lookup.
> Please see http://bugme.osdl.org/show_bug.cgi?id=1552 for oops traces > and a testcase. Andrew posted a one-liner patch there which was > included in mm4 which is also needed.
gargh, I was waiting to hear back on that patch, and there it is. Durned bugzilla. Thanks. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |