Skip to content

NFSD: fix races in service per-net resources allocation

Stanislav Kinsbursky linux-nfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2per-cpu semaphores: export symbols to moduleslib/Makefile lib/percpu-rwsem.c+7 -10 replies
2/2SUNRPC: protect transport processing with per-cpu rw semaphoreinclude/linux/sunrpc/svc.h net/sunrpc/Kconfig net/sunrpc/svc.c +1 more+32 -60 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStanislav Kinsbursky
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] NFSD: fix races in service per-net resources allocation

After "NFS" (SUNRPC + NFSd actually) containerization work some basic principles of SUNRPC service initialization and deinitialization has been
changed: now one service can be shared between different network namespaces and network "resources" can be attached or detached from the running service. This leads to races, described here:

https://bugzilla.redhat.com/show_bug.cgi?id=904870

and which this small patch set is aimed to solve by using per-cpu rw semphores to sync per-net resources processing and shutdown.

The following series implements...

---

Stanislav Kinsbursky (2):
per-cpu semaphores: export symbols to modules
SUNRPC: protect transport processing with per-cpu rw semaphore

 include/linux/sunrpc/svc.h |    2 ++
 lib/Makefile               |    2 +-
 lib/percpu-rwsem.c         |    6 ++++++
 net/sunrpc/Kconfig         |    1 +
 net/sunrpc/svc.c           |    2 ++
 net/sunrpc/svc_xprt.c      |   33 +++++++++++++++++++++++++++------
 6 files changed, 39 insertions(+), 7 deletions(-)