LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com> To: akpm@linux-foundation.org, neilb@suse.de Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] Intro: convert lockd to kthread and fix use-after-free (try #7) Date: Thu, 10 Jan 2008 13:01:31 -0500 [thread overview] Message-ID: <1199988096-19700-1-git-send-email-jlayton@redhat.com> (raw) This is the seventh patchset to fix the use-after-free problem in lockd which we originally discussed back in October. Along the way, Christoph Hellwig mentioned that it would be advantageous to convert lockd to use the kthread API. This patch set first makes that change and then patches it to actually fix the use after free problem. It also fixes a couple of minor bugs in the current lockd implementation. This patch takes a different approach in fixing the use-after-free than earlier ones. Instead of trying to ensure that lockd stays up until all callbacks complete, this patch tries to just make sure that all RPC's are canceled when lockd is requested to come down. With this change we no longer need to have lockd_down signal lockd, we don't need to do any extra reference counting, and can use the more conventional kthread functions to handle lockd shutdown. I've done some very basic testing and everything seems to work as expected. I've also tested this against the reproducer that I have for the use-after-free problem and this does fix it. I've tried to make this cleanly bisectable, but have only really tested the final result. Many thanks to Trond Myklebust, Chuck Lever, Neil Brown and Christoph Hellwig for their guidance on this. Signed-off-by: Jeff Layton <jlayton@redhat.com>
next reply other threads:[~2008-01-10 18:02 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-10 18:01 Jeff Layton [this message] 2008-01-10 18:01 ` [PATCH 1/5] SUNRPC: spin svc_rqst initialization to its own function Jeff Layton 2008-01-10 18:01 ` [PATCH 2/5] SUNRPC: export svc_sock_update_bufs Jeff Layton 2008-01-10 18:01 ` [PATCH 3/5] NLM: Have lockd call try_to_freeze Jeff Layton 2008-01-10 18:01 ` [PATCH 4/5] NLM: Convert lockd to use kthreads Jeff Layton 2008-01-10 18:01 ` [PATCH 5/5] NLM: have nlm_shutdown_hosts kill off all NLM RPC tasks Jeff Layton 2008-01-13 11:54 ` [PATCH 3/5] NLM: Have lockd call try_to_freeze Jeff Layton 2008-01-13 22:24 ` Neil Brown 2008-01-13 23:59 ` Rafael J. Wysocki 2008-01-11 1:37 ` [PATCH 0/5] Intro: convert lockd to kthread and fix use-after-free (try #7) Neil Brown
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=1199988096-19700-1-git-send-email-jlayton@redhat.com \ --to=jlayton@redhat.com \ --cc=akpm@linux-foundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nfs@vger.kernel.org \ --cc=neilb@suse.de \ /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: linkBe 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; as well as URLs for NNTP newsgroup(s).