[PATCH 0/6] Intro: convert lockd to kthread and fix use-after-free (try #5)

2008-01-05 Thread Jeff Layton
This is the fifth patchset to fix the use-after-free problem in lockd
which we originally discussed back in October. The main problem is
detailed in the last patch of the series. 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.

The main changes from the original patchset are:

+ dropped the new thread creation helper and just have lockd_up call
  kthread_run directly. 
+ dropped the first patch that changed svc_pool_map_set_cpumask, since
  it's no longer needed. 
+ added a warning message when lockd_down is called for the final time,
  but lockd is still up
+ done some style cleanups recommended by checkpatch.pl.

I've done some basic smoke 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 and Christoph Hellwig for
their guidance on this.

Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/6] Intro: convert lockd to kthread and fix use-after-free (try #5)

2008-01-05 Thread Jeff Layton
This is the fifth patchset to fix the use-after-free problem in lockd
which we originally discussed back in October. The main problem is
detailed in the last patch of the series. 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.

The main changes from the original patchset are:

+ dropped the new thread creation helper and just have lockd_up call
  kthread_run directly. 
+ dropped the first patch that changed svc_pool_map_set_cpumask, since
  it's no longer needed. 
+ added a warning message when lockd_down is called for the final time,
  but lockd is still up
+ done some style cleanups recommended by checkpatch.pl.

I've done some basic smoke 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 and Christoph Hellwig for
their guidance on this.

Signed-off-by: Jeff Layton [EMAIL PROTECTED]

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/