Commit f385f7d
NFSD: register/unregister of nfsd-client shrinker at nfsd startup/shutdown time
Currently the nfsd-client shrinker is registered and unregistered at
the time the nfsd module is loaded and unloaded. The problem with this
is the shrinker is being registered before all of the relevant fields
in nfsd_net are initialized when nfsd is started. This can lead to an
oops when memory is low and the shrinker is called while nfsd is not
running.
This patch moves the register/unregister of nfsd-client shrinker from
module load/unload time to nfsd startup/shutdown time.
Fixes: 44df6f4 ("NFSD: add delegation reaper to react to low memory condition")
Reported-by: Mike Galbraith <[email protected]>
Signed-off-by: Dai Ngo <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent e6cf91b commit f385f7d
3 files changed
+14
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4421 | 4421 | | |
4422 | 4422 | | |
4423 | 4423 | | |
4424 | | - | |
| 4424 | + | |
4425 | 4425 | | |
4426 | 4426 | | |
4427 | 4427 | | |
| |||
4443 | 4443 | | |
4444 | 4444 | | |
4445 | 4445 | | |
4446 | | - | |
4447 | | - | |
4448 | | - | |
4449 | | - | |
4450 | | - | |
4451 | | - | |
4452 | | - | |
4453 | | - | |
4454 | | - | |
4455 | | - | |
4456 | 4446 | | |
4457 | 4447 | | |
4458 | 4448 | | |
| |||
8069 | 8059 | | |
8070 | 8060 | | |
8071 | 8061 | | |
| 8062 | + | |
| 8063 | + | |
| 8064 | + | |
| 8065 | + | |
| 8066 | + | |
| 8067 | + | |
8072 | 8068 | | |
8073 | 8069 | | |
| 8070 | + | |
| 8071 | + | |
| 8072 | + | |
8074 | 8073 | | |
8075 | 8074 | | |
8076 | 8075 | | |
| |||
8163 | 8162 | | |
8164 | 8163 | | |
8165 | 8164 | | |
| 8165 | + | |
8166 | 8166 | | |
8167 | 8167 | | |
8168 | 8168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1457 | 1457 | | |
1458 | 1458 | | |
1459 | 1459 | | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
| 1460 | + | |
1463 | 1461 | | |
1464 | 1462 | | |
1465 | 1463 | | |
| |||
1469 | 1467 | | |
1470 | 1468 | | |
1471 | 1469 | | |
1472 | | - | |
1473 | | - | |
1474 | 1470 | | |
1475 | 1471 | | |
1476 | 1472 | | |
| |||
1486 | 1482 | | |
1487 | 1483 | | |
1488 | 1484 | | |
1489 | | - | |
1490 | 1485 | | |
1491 | 1486 | | |
1492 | 1487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
| 507 | + | |
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
516 | | - | |
517 | | - | |
| 515 | + | |
518 | 516 | | |
519 | 517 | | |
520 | 518 | | |
| |||
0 commit comments