From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove BKL from sysctl(2)
Date: Wed, 23 Jan 2008 10:51:40 +0000 [thread overview]
Message-ID: <20080123105140.3406e25b@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20080122202727.GB1975@martell.zuzino.mipt.ru>
On Tue, 22 Jan 2008 23:27:27 +0300
Alexey Dobriyan <adobriyan@gmail.com> wrote:
> /proc/sys part of sysctl code runs without BKL held, so BKL during
> sysctl(2) is useless. Remove misleading comment and "protection" around
> coredumping code -- kernel.core_pattern can be written without BKL.
>
> do_sysctl() and lookup in /proc/sys use identical iterators, so any locking
> bug BKL supposedly fixed in sysctl(2) code we should have in /proc/sys
> code anyway.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
NAK
The core dump locking is now totally unprotected rather than slightly
dubious. This patch needs to go in together with a parallel patch to
actually lock properly. You've made a bug worse not fixed it.
There are cases that updating the corepath name and dumping a core at the
same moment can result in the wrong thing being exec()'d or a file being
opened which is a mix of the old and new name and could go anywhere.
I see two variants on your patch that work
#1 Replace the lock_kernel with a sysctl_update mutex and fix both
paths
#2 Add locking specifically to the corename path
Alan
next prev parent reply other threads:[~2008-01-23 10:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 20:27 Alexey Dobriyan
2008-01-22 20:52 ` Ingo Molnar
2008-01-23 10:51 ` Alan Cox [this message]
2008-01-23 11:09 ` Andi Kleen
2008-01-23 11:38 ` Alan Cox
2008-01-24 7:56 ` Andi Kleen
2008-01-27 12:26 ` [PATCH 2/2] Race-free kernel.core_pattern Alexey Dobriyan
2008-01-27 16:49 ` Andi Kleen
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=20080123105140.3406e25b@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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®