mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 05:13:40 +00:00
501bdf3001
Since newnfs_copycred() calls crsetgroups() which in turn calls crextend() which might do a malloc(M_WAITOK), newnfs_copycred() cannot be called with a mutex held. Fortunately, the malloc() call is rarely done, since XU_GROUPS is 16 and the NFS client uses a maximum of 17 (only 17 groups will cause the malloc() to be called). Further, it is only a problem if the malloc() tries to sleep(). As such, this bug does not seem to have caused problems in practice. This patch fixes the one place in the NFS client where newnfs_copycred() is called while a mutex is held by moving the call to after where the mutex is released. Found by inspection while working on an experimental patch. MFC after: 2 weeks |
||
---|---|---|
.. | ||
nfs.h | ||
nfs_clbio.c | ||
nfs_clcomsubs.c | ||
nfs_clkdtrace.c | ||
nfs_clkrpc.c | ||
nfs_clnfsiod.c | ||
nfs_clnode.c | ||
nfs_clport.c | ||
nfs_clrpcops.c | ||
nfs_clstate.c | ||
nfs_clsubs.c | ||
nfs_clvfsops.c | ||
nfs_clvnops.c | ||
nfs_kdtrace.h | ||
nfsmount.h | ||
nfsnode.h | ||
nlminfo.h |