mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH] proc: stop using BKL
Date: Fri, 24 Oct 2008 11:55:15 -0400	[thread overview]
Message-ID: <20081024155515.GA12984@infradead.org> (raw)
In-Reply-To: <20081024114606.GA21904@x200.localdomain>

On Fri, Oct 24, 2008 at 03:46:06PM +0400, Alexey Dobriyan wrote:
>     3) proc_readdir_de()
>     --------------------
>     "." and ".." part doesn't need BKL, walking PDE list is under
>     proc_subdir_lock, calling filldir callback is potentially blocking
>     because it writes to luserspace. All proc_readdir_de() callers
>     eventually come from ->readdir hook which is under directory's
>     ->i_mutex -- BKL doesn't protect anything.
>     
>     4) proc_root_readdir_de()
>     -------------------------
>     proc_root_readdir_de is ->readdir hook, see (3).
>     
>     Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Once you stop taking BKL in readdir you also need to switch to
generic_file_llseek for those directories.  It would be good if you
could switch the fallback proc_reg_llseek to no llseek at all in
proc_reg_llseek while you're at it.  I'll prepare a similar change
for non-procfs fops instances.


  reply	other threads:[~2008-10-24 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 11:46 Alexey Dobriyan
2008-10-24 15:55 ` Christoph Hellwig [this message]
2008-10-24 19:35   ` Alexey Dobriyan

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=20081024155515.GA12984@infradead.org \
    --to=hch@infradead.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.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®