Skip to content

gssd: prevent race between gssd startup and fstab mounts

Jeff Layton linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nfs-utils: consolidate mydaemon() and release_parent() implementationssupport/include/nfslib.h support/nfs/Makefile.am support/nfs/mydaemon.c +2 more+159 -1671 reply
2/2gssd: don't let parent exit until child has a chance to scan directory onceutils/gssd/gssd.c utils/gssd/gssd.h utils/gssd/gssd_main_loop.c+9 -24 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/2] gssd: prevent race between gssd startup and fstab mounts

I recently proposed a patchset that allows the kernel to figure out if gssd is running in a more robust fashion than it has in the past.

While reviewing that, Bruce pointed out that that mechanism may cause us to race with mounts that are happening at init time since the parent process does not wait until the child is set up when daemonizing.

This patchset aims to correct that by switching gssd to use the mydaemon() function that we use in other tools for a similar purpose. Instead of cut and pasting that though like has been done in the past, I've gone ahead and moved the function into libnfs.a and made the existing users link that in at compile time.

Jeff Layton (2):
nfs-utils: consolidate mydaemon() and release_parent() implementations
gssd: don't let parent exit until child has a chance to scan directory
once

 support/include/nfslib.h    |   4 ++
 support/nfs/Makefile.am     |   2 +-
 support/nfs/mydaemon.c      | 148 ++++++++++++++++++++++++++++++++++++++++++++
 utils/gssd/gssd.c           |   6 +-
 utils/gssd/gssd.h           |   1 +
 utils/gssd/gssd_main_loop.c |   4 ++
 utils/gssd/svcgssd.c        |  90 +--------------------------
 utils/idmapd/idmapd.c       |  82 +-----------------------
 8 files changed, 168 insertions(+), 169 deletions(-)
 create mode 100644 support/nfs/mydaemon.c
Signature · 1 line
1.8.3.1