linux/fs
Trond Myklebust cfde64bd31 NFSv4: Fix races in the legacy idmapper upcall
commit 51fd2eb52c upstream.

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: e9ab41b620 ("NFSv4: Clean up the legacy idmapper upcall")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:37:54 +02:00
..
9p 9p: missing chunk of "fs/9p: Don't update file type when updating file attributes" 2022-06-22 14:13:12 +02:00
adfs
affs
afs afs: Fix dynamic root getattr 2022-06-29 08:59:49 +02:00
autofs
befs
bfs
btrfs btrfs: fix lost error handling when looking up extended ref on log replay 2022-08-25 11:37:51 +02:00
cachefiles
ceph ceph: allow ceph.dir.rctime xattr to be updatable 2022-06-14 18:32:44 +02:00
cifs cifs: fix reconnect on smb3 mount types 2022-06-14 18:32:45 +02:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm dlm: fix pending remove if msg allocation fails 2022-07-29 17:19:24 +02:00
ecryptfs
efivarfs
efs
erofs erofs: avoid consecutive detection for Highmem memory 2022-08-21 15:15:35 +02:00
exfat exfat: check if cluster num is valid 2022-06-06 08:42:42 +02:00
exportfs
ext2 ext2: Add more validity checks for inode counts 2022-08-21 15:15:28 +02:00
ext4 ext4: correct the misjudgment in ext4_iget_extra_inode 2022-08-21 15:16:24 +02:00
f2fs f2fs: fix to remove F2FS_COMPR_FL and tag F2FS_NOCOMP_FL at the same time 2022-08-21 15:16:11 +02:00
fat fat: add ratelimit to fat*_ent_bread() 2022-06-09 10:20:58 +02:00
freevxfs
fscache
fuse fuse: Remove the control interface for virtio-fs 2022-08-21 15:16:10 +02:00
gfs2 gfs2: use i_lock spin_lock for inode qadata 2022-06-09 10:20:57 +02:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs
iomap xfs: use current->journal_info for detecting transaction recursion 2022-07-07 17:52:19 +02:00
isofs
jbd2 jbd2: fix assertion 'jh->b_frozen_data == NULL' failure when journal aborted 2022-08-21 15:16:04 +02:00
jffs2 jffs2: fix memory leak in jffs2_do_fill_super 2022-06-14 18:32:35 +02:00
jfs fs: jfs: fix possible NULL pointer dereference in dbFree() 2022-06-09 10:20:57 +02:00
kernfs kernfs: Separate kernfs_pr_cont_buf and rename_lock. 2022-06-14 18:32:43 +02:00
lockd
minix
nfs NFSv4: Fix races in the legacy idmapper upcall 2022-08-25 11:37:54 +02:00
nfs_common
nfsd NFSD: restore EINVAL error translation in nfsd_commit() 2022-07-07 17:52:17 +02:00
nilfs2 nilfs2: fix incorrect masking of permission flags for symlinks 2022-07-21 21:20:01 +02:00
nls
notify fsnotify: fix wrong lockdep annotations 2022-06-09 10:21:03 +02:00
ntfs ntfs: fix use-after-free in ntfs_ucsncmp() 2022-08-03 12:00:43 +02:00
ocfs2 Revert "ocfs2: mount shared volume without ha stack" 2022-08-03 12:00:43 +02:00
omfs
openpromfs
orangefs
overlayfs ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() 2022-08-21 15:15:23 +02:00
proc proc: fix dentry/inode overinstantiating under /proc/${pid}/net 2022-06-09 10:21:17 +02:00
pstore
qnx4
qnx6
quota quota: Prevent memory allocation recursion while holding dq_lock 2022-06-22 14:13:14 +02:00
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
unicode
vboxsf
verity
xfs xfs: fix I_DONTCACHE 2022-08-21 15:15:21 +02:00
zonefs zonefs: fix zonefs_iomap_begin() for reads 2022-06-25 15:16:08 +02:00
aio.c
anon_inodes.c
attr.c vfs: Check the truncate maximum size in inode_newsize_ok() 2022-08-21 15:15:22 +02:00
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c binfmt_flat: do not stop relocating GOT entries prematurely on riscv 2022-06-09 10:20:47 +02:00
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c dax: fix cache flush on PMD-mapped pages 2022-06-09 10:21:16 +02:00
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c epoll: autoremove wakers even more aggressively 2022-08-21 15:15:28 +02:00
exec.c posix-cpu-timers: Cleanup CPU timers before freeing them during exec 2022-08-21 15:16:14 +02:00
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages 2022-06-09 10:21:22 +02:00
fsopen.c
init.c
inode.c
internal.h
io_uring.c io_uring: Use original task for req identity in io_identity_cow() 2022-07-29 17:19:07 +02:00
io-wq.c
io-wq.h
ioctl.c
Kconfig
Kconfig.binfmt
kernel_read_file.c
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c __follow_mount_rcu(): verify that mount_lock remains unchanged 2022-08-21 15:16:15 +02:00
namespace.c
no-block.c
nsfs.c
open.c
pipe.c pipe: Fix missing lock in pipe_resize_ring() 2022-06-06 08:42:41 +02:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c fs/remap: constrain dedupe of EOF blocks 2022-07-21 21:20:01 +02:00
select.c
seq_file.c
signalfd.c
splice.c fs: check FMODE_LSEEK to control internal pipe splicing 2022-08-21 15:15:47 +02:00
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c