From: Andrew Morton <akpm@osdl.org>
To: Nathan Lynch <nathanl@austin.ibm.com>
Cc: linux-kernel@vger.kernel.org, zwane@arm.linux.org.uk,
viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [PATCH] better locking in fs/proc/generic.c (bug 1552)
Date: Fri, 21 Nov 2003 14:46:30 -0800 [thread overview]
Message-ID: <20031121144630.018aee48.akpm@osdl.org> (raw)
In-Reply-To: <3FBE92D2.7080300@austin.ibm.com>
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.
prev parent reply other threads:[~2003-11-21 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-21 22:33 Nathan Lynch
2003-11-21 22:46 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031121144630.018aee48.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathanl@austin.ibm.com \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
--cc=zwane@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®