mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] fix potential races in lockd and nfs4-callback startup/shutdown
@ 2008-06-11 14:03 Jeff Layton
  2008-06-11 14:03 ` [PATCH 1/3] nfs4: remove BKL from nfs_callback_up and nfs_callback_down Jeff Layton
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2008-06-11 14:03 UTC (permalink / raw)
  To: trond.myklebust, bfields; +Cc: linux-nfs, nfsv4, linux-kernel

As Trond Myklebust pointed out, the current kthread-based lockd and
nfsv4 callback threads have a race condition if they are started and
brought down very rapidly. If this occurs, there is a chance that the
main thread function will never be run, and the cleanup done when the
function exits will not occur. This patchset fixes this by moving the
cleanup into the respective *_down functions.

While Bruce has just taken in a patchset from me to change nfsd to
kthreads, this race doesn't seem to exist there. We aren't using
kthread_stop() to take down nfsd, only signals, so I don't think the
kthread can be stopped before nfsd() actually runs.

The set also includes a patch to remove the BKL from nfs_callback_up
and nfs_callback_down.

Signed-off-by: Jeff Layton <jlayton@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-13 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-11 14:03 [PATCH 0/3] fix potential races in lockd and nfs4-callback startup/shutdown Jeff Layton
2008-06-11 14:03 ` [PATCH 1/3] nfs4: remove BKL from nfs_callback_up and nfs_callback_down Jeff Layton
2008-06-11 14:03   ` [PATCH 2/3] nfs4: fix potential race with rapid nfs_callback_up/down cycle Jeff Layton
2008-06-11 14:03     ` [PATCH 3/3] lockd: close potential race with rapid lockd_up/lockd_down cycle Jeff Layton
2008-06-13 17:53       ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome