Repository navigation
Commit ff7d975
nfsd: use static memory for callback program and stats
There's no need to dynamically allocate this memory, and doing so may
create the possibility of races on shutdown of the rpc client. (We've
witnessed it only after adding rpcsec_gss support to the server, after
which the rpc code can send destroys calls that expect to still be able
to access the rpc_stats structure after it has been destroyed.)
Such races are in theory possible if the module containing this "static"
memory is removed very quickly after an rpc client is destroyed, but
we haven't seen that happen.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>1 parent 8774282 commit ff7d975
1 file changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
347 | 362 | | |
348 | 363 | | |
349 | 364 | | |
| |||
358 | 373 | | |
359 | 374 | | |
360 | 375 | | |
361 | | - | |
362 | 376 | | |
363 | 377 | | |
364 | 378 | | |
365 | 379 | | |
366 | 380 | | |
367 | | - | |
| 381 | + | |
368 | 382 | | |
369 | 383 | | |
370 | 384 | | |
| |||
382 | 396 | | |
383 | 397 | | |
384 | 398 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 399 | | |
393 | | - | |
394 | | - | |
| 400 | + | |
395 | 401 | | |
396 | 402 | | |
397 | 403 | | |
| |||
0 commit comments