diff options
author | Amir Goldstein <[email protected]> | 2018-07-13 17:22:24 +0300 |
---|---|---|
committer | J. Bruce Fields <[email protected]> | 2018-08-09 16:11:21 -0400 |
commit | 64bed6cbe38bc95689fb9399872d9ce250192f90 (patch) | |
tree | 6376a71e746622c32818abd785c05a09593a01a8 /net/sunrpc/auth_gss/gss_krb5_wrap.c | |
parent | 8163496e78db100a6b5cfbdaece385686ae50129 (diff) |
nfsd: fix leaked file lock with nfs exported overlayfs
nfsd and lockd call vfs_lock_file() to lock/unlock the inode
returned by locks_inode(file).
Many places in nfsd/lockd code use the inode returned by
file_inode(file) for lock manipulation. With Overlayfs, file_inode()
(the underlying inode) is not the same object as locks_inode() (the
overlay inode). This can result in "Leaked POSIX lock" messages
and eventually to a kernel crash as reported by Eddie Horng:
https://marc.info/?l=linux-unionfs&m=153086643202072&w=2
Fix all the call sites in nfsd/lockd that should use locks_inode().
This is a correctness bug that manifested when overlayfs gained
NFS export support in v4.16.
Reported-by: Eddie Horng <[email protected]>
Tested-by: Eddie Horng <[email protected]>
Cc: Jeff Layton <[email protected]>
Fixes: 8383f1748829 ("ovl: wire up NFS export operations")
Cc: [email protected]
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_krb5_wrap.c')
0 files changed, 0 insertions, 0 deletions