Trond Myklebust 51fd2eb52c NFSv4: Fix races in the legacy idmapper upcall
nfs_idmap_instantiate() will cause the process that is waiting in
request_key_with_auxdata() to wake up and exit. If there is a second
process waiting for the idmap->idmap_mutex, then it may wake up and
start a new call to request_key_with_auxdata(). If the call to
idmap_pipe_downcall() from the first process has not yet finished
calling nfs_idmap_complete_pipe_upcall_locked(), then we may end up
triggering the WARN_ON_ONCE() in nfs_idmap_prepare_pipe_upcall().

The fix is to ensure that we clear idmap->idmap_upcall_data before
calling nfs_idmap_instantiate().

Fixes: e9ab41b620e4 ("NFSv4: Clean up the legacy idmapper upcall")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2022-07-13 17:46:52 -04:00
..
2020-05-27 10:10:12 -04:00
2022-07-12 10:53:10 -04:00
2022-05-09 23:12:33 -04:00
2022-04-08 07:39:17 -10:00
2021-04-05 09:04:20 -04:00
2022-05-09 16:21:46 -04:00
2022-05-09 16:36:48 -04:00