HomeFreeBSD

freebsd/libshare: nfs: don't send SIGHUP to all processes

Description

freebsd/libshare: nfs: don't send SIGHUP to all processes

pidfile_open() sets *pidptr to -1 if the process currently holding
the lock is between pidfile_open() and pidfile_write(),
the subsequent kill(mountdpid) would potentially SIGHUP all
non-system processes except init: just sleep for half a millisecond
and try again in that case

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on May 17 2021, 4:03 PM
Tony Hutter <hutter2@llnl.gov>Committed on Feb 3 2022, 11:28 PM
Parents
rG9ec630ff2cd7: Fix zvol_open() lock inversion
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGa1a52a356ba7: freebsd/libshare: nfs: don't send SIGHUP to all processes (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).Feb 3 2022, 11:28 PM