Skip to content

Intro: convert lockd to kthread and fix use-after-free (try #2)

Jeff Layton linux-nfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7SUNRPC: Allow svc_pool_map_set_cpumask to work with any tasknet/sunrpc/svc.c+10 -60 replies
2/7SUNRPC: spin svc_rqst initialization to its own functioninclude/linux/sunrpc/svc.h net/sunrpc/sunrpc_syms.c net/sunrpc/svc.c+33 -120 replies
3/7SUNRPC: make new svc_create_kthread functioninclude/linux/sunrpc/svc.h net/sunrpc/sunrpc_syms.c net/sunrpc/svc.c+22 -01 reply
4/7NLM: Initialize completion variable in lockd_upfs/lockd/svc.c+1 -00 replies
5/7NLM: Have lockd call try_to_freezefs/lockd/svc.c+3 -00 replies
6/7NLM: Convert lockd to use kthreadsfs/lockd/svc.c+27 -370 replies
7/7NLM: Add reference counting to lockdfs/lockd/svc.c fs/lockd/svclock.c include/linux/lockd/lockd.h+45 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] Intro: convert lockd to kthread and fix use-after-free (try #2)

This is the second patchset to fix the use-after-free problem in lockd, and to convert lockd to use the kthread API instead of kernel_thread. The main change from the last patchset is that svc_prepare_thread is now exported and svc_create_kthread no longer calls it. The caller of svc_create_kthread must now call it (or do the equivalent to set up the svc_rqst.

Tested against the reproducer I have for the main issue (detailed in patch #7). As always, comments and suggestions are appreciated.