]> Git Repo - linux.git/commit - fs/nfsd/nfscache.c
knfsd: fix reply cache memory corruption
authorGreg Banks <[email protected]>
Tue, 31 Mar 2009 20:28:15 +0000 (07:28 +1100)
committerJ. Bruce Fields <[email protected]>
Wed, 27 May 2009 18:14:02 +0000 (14:14 -0400)
commitcf0a586cf41a1779edeee7562afb5d0ab46c7cf4
tree3ede97c75e5adf69b19c397209dd60904ee26f4e
parentfca4217c5bab31019b5247e977673c9fcc385f6b
knfsd: fix reply cache memory corruption

Fix a regression in the reply cache introduced when the code was
converted to use proper Linux lists.  When a new entry needs to be
inserted, the case where all the entries are currently being used
by threads is not correctly detected.  This can result in memory
corruption and a crash.  In the current code this is an extremely
unlikely corner case; it would require the machine to have 1024
nfsd threads and all of them to be busy at the same time.  However,
upcoming reply cache changes make this more likely; a crash due to
this problem was actually observed in field.

Signed-off-by: Greg Banks <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
fs/nfsd/nfscache.c
This page took 0.048472 seconds and 4 git commands to generate.