public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Korty <joe.korty@ccur.com>
To: linux-kernel@vger.kernel.org
Cc: drepper@redhat.com, akpm@osdl.org, Trond.Myklebust@netapp.com,
	mingo@elte.hu
Subject: lock_kernel called under spinlock in NFS
Date: Thu, 1 Jun 2006 15:55:35 -0400	[thread overview]
Message-ID: <20060601195535.GA28188@tsunami.ccur.com> (raw)

Tree 5fdccf2354269702f71beb8e0a2942e4167fd992

        [PATCH] vfs: *at functions: core

introduced a bug where lock_kernel() can be called from
under a spinlock.  To trigger the bug one must have
CONFIG_PREEMPT_BKL=y and be using NFS heavily.  It is
somewhat rare and, so far, haven't traced down the userland
sequence that causes the fatal path to be taken.

The bug was caused by the insertion into do_path_lookup()
of a call to file_permission().  do_path_lookup()
read-locks current->fs->lock for most of its operation.
file_permission() calls permission() which calls
nfs_permission(), which has one path through it
that uses lock_kernel().

I am not sure how to fix this bug.  It is not clear what
the lock_kernel() call is protecting. Nor is it clear why,
as part of the introduction of the openat() etc services,
it was desirable to add a call to file_permission()
to do_path_lookup().

For now, I plan to turn off CONFIG_PREEMPT_BKL.

Regards,
Joe

             reply	other threads:[~2006-06-01 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-01 19:55 Joe Korty [this message]
2006-06-01 20:13 ` lock_kernel called under spinlock in NFS Trond Myklebust
2006-06-02 20:24   ` Joe Korty
2006-06-02 20:27     ` Trond Myklebust
2006-06-02 20:43       ` Andrew Morton
2006-06-02 21:26         ` Trond Myklebust
2006-06-03 18:30         ` Sergey Vlasov
2006-06-03 22:10           ` Trond Myklebust

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=20060601195535.GA28188@tsunami.ccur.com \
    --to=joe.korty@ccur.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=akpm@osdl.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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