Skip to content
Commit 83bfff23 authored by Jeff Layton's avatar Jeff Layton
Browse files

nfs4: have do_vfs_lock take an inode pointer



Now that we have file locking helpers that can deal with an inode
instead of a filp, we can change the NFSv4 locking code to use that
instead.

This should fix the case where we have a filp that is closed while flock
or OFD locks are set on it, and the task is signaled so that it doesn't
wait for the LOCKU reply to come in before the filp is freed. At that
point we can end up with a use-after-free with the current code, which
relies on dereferencing the fl_file in the lock request.

Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
Reviewed-by: default avatar"J. Bruce Fields" <bfields@fieldses.org>
Tested-by: default avatar"J. Bruce Fields" <bfields@fieldses.org>
parent 29d01b22
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment