Commit 8e948c3
nfsd: fix oops when reading pool_stats before server is started
Sourbh reported an oops that is triggerable by trying to read the
pool_stats procfile before nfsd had been started. Move the check for a
NULL serv in svc_pool_stats_start above the mutex acquisition, and fix
the stop routine not to unlock the mutex if there is no serv yet.
Fixes: 7b207cc ("svc: don't hold reference for poolstats, only mutex.")
Reported-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent 4a77c3d commit 8e948c3
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1424 | 1427 | | |
1425 | 1428 | | |
1426 | 1429 | | |
1427 | 1430 | | |
1428 | | - | |
1429 | | - | |
1430 | 1431 | | |
1431 | 1432 | | |
1432 | 1433 | | |
| |||
1458 | 1459 | | |
1459 | 1460 | | |
1460 | 1461 | | |
1461 | | - | |
| 1462 | + | |
| 1463 | + | |
1462 | 1464 | | |
1463 | 1465 | | |
1464 | 1466 | | |
| |||
0 commit comments