Revision 88956eabfdea7d01d550535af120d4ef265b1d02 authored by NeilBrown on 12 September 2023, 01:25:00 UTC, committed by Chuck Lever on 12 September 2023, 13:39:35 UTC
If /proc/fs/nfsd/pool_stats is open when the last nfsd thread exits, then when the file is closed a NULL pointer is dereferenced. This is because nfsd_pool_stats_release() assumes that the pointer to the svc_serv cannot become NULL while a reference is held. This used to be the case but a recent patch split nfsd_last_thread() out from nfsd_put(), and clearing the pointer is done in nfsd_last_thread(). This is easily reproduced by running rpc.nfsd 8 ; ( rpc.nfsd 0;true) < /proc/fs/nfsd/pool_stats Fortunately nfsd_pool_stats_release() has easy access to the svc_serv pointer, and so can call svc_put() on it directly. Fixes: 9f28a971ee9f ("nfsd: separate nfsd_last_thread() from nfsd_put()") Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent fdd2630
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 516 bytes |
Makefile | -rw-r--r-- | 362 bytes |
ast.c | -rw-r--r-- | 6.6 KB |
ast.h | -rw-r--r-- | 1.4 KB |
config.c | -rw-r--r-- | 22.7 KB |
config.h | -rw-r--r-- | 1.4 KB |
debug_fs.c | -rw-r--r-- | 21.6 KB |
dir.c | -rw-r--r-- | 7.3 KB |
dir.h | -rw-r--r-- | 889 bytes |
dlm_internal.h | -rw-r--r-- | 22.1 KB |
lock.c | -rw-r--r-- | 155.9 KB |
lock.h | -rw-r--r-- | 3.0 KB |
lockspace.c | -rw-r--r-- | 21.2 KB |
lockspace.h | -rw-r--r-- | 1.3 KB |
lowcomms.c | -rw-r--r-- | 47.6 KB |
lowcomms.h | -rw-r--r-- | 2.0 KB |
lvb_table.h | -rw-r--r-- | 541 bytes |
main.c | -rw-r--r-- | 1.8 KB |
member.c | -rw-r--r-- | 16.8 KB |
member.h | -rw-r--r-- | 1.3 KB |
memory.c | -rw-r--r-- | 3.7 KB |
memory.h | -rw-r--r-- | 1.3 KB |
midcomms.c | -rw-r--r-- | 40.0 KB |
midcomms.h | -rw-r--r-- | 1.7 KB |
plock.c | -rw-r--r-- | 12.1 KB |
rcom.c | -rw-r--r-- | 17.0 KB |
rcom.h | -rw-r--r-- | 987 bytes |
recover.c | -rw-r--r-- | 22.9 KB |
recover.h | -rw-r--r-- | 1.3 KB |
recoverd.c | -rw-r--r-- | 8.8 KB |
recoverd.h | -rw-r--r-- | 781 bytes |
requestqueue.c | -rw-r--r-- | 5.0 KB |
requestqueue.h | -rw-r--r-- | 736 bytes |
user.c | -rw-r--r-- | 25.4 KB |
user.h | -rw-r--r-- | 463 bytes |
util.c | -rw-r--r-- | 1.6 KB |
util.h | -rw-r--r-- | 545 bytes |
Computing file changes ...