linux-stable/fs
Alexander Aring 5c7403f952 dlm: fix plock lookup when using multiple lockspaces
commit 7c53e847ff upstream.

All posix lock ops, for all lockspaces (gfs2 file systems) are
sent to userspace (dlm_controld) through a single misc device.
The dlm_controld daemon reads the ops from the misc device
and sends them to other cluster nodes using separate, per-lockspace
cluster api communication channels.  The ops for a single lockspace
are ordered at this level, so that the results are received in
the same sequence that the requests were sent.  When the results
are sent back to the kernel via the misc device, they are again
funneled through the single misc device for all lockspaces.  When
the dlm code in the kernel processes the results from the misc
device, these results will be returned in the same sequence that
the requests were sent, on a per-lockspace basis.  A recent change
in this request/reply matching code missed the "per-lockspace"
check (fsid comparison) when matching request and reply, so replies
could be incorrectly matched to requests from other lockspaces.

Cc: stable@vger.kernel.org
Reported-by: Barry Marson <bmarson@redhat.com>
Fixes: 57e2c2f2d9 ("fs: dlm: fix mismatch of plock results from userspace")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:48:41 +02:00
..
9p fs/9p: remove unnecessary invalidate_inode_pages2 2023-08-03 10:26:12 +02:00
adfs
affs
afs afs: Fix accidental truncation when storing data 2023-07-19 16:36:48 +02:00
autofs
befs
bfs
btrfs btrfs: only subtract from len_to_oe_boundary when it is tracking an extent 2023-08-23 17:32:39 +02:00
cachefiles
ceph ceph: try to dump the msgs when decoding fails 2023-08-23 17:32:32 +02:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm dlm: fix plock lookup when using multiple lockspaces 2023-09-13 09:48:41 +02:00
ecryptfs
efivarfs
efs
erofs erofs: ensure that the post-EOF tails are all zeroed 2023-09-06 21:25:28 +01:00
exfat exfat: release s_lock before calling dir_emit() 2023-08-11 12:14:20 +02:00
exportfs
ext2 ext2: Drop fragment support 2023-08-11 12:14:25 +02:00
ext4 ext4: fix unttached inode after power cut with orphan file feature enabled 2023-09-13 09:48:24 +02:00
f2fs f2fs: fix to account cp stats correctly 2023-09-13 09:48:33 +02:00
fat
freevxfs
fscache
fuse Revert "fuse: in fuse_flush only wait if someone wants the return code" 2023-09-13 09:47:56 +02:00
gfs2 gfs2: Fix possible data races in gfs2_show_options() 2023-08-23 17:32:31 +02:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs hugetlb: revert use of page_cache_next_miss() 2023-07-05 18:30:30 +01:00
iomap iomap: Remove large folio handling in iomap_invalidate_folio() 2023-09-13 09:47:57 +02:00
isofs
jbd2 jbd2: fix a race when checking checkpoint buffer busy 2023-08-30 14:52:28 +02:00
jffs2 jffs2: reduce stack usage in jffs2_build_xattr_subsystem() 2023-07-19 16:36:54 +02:00
jfs jfs: validate max amount of blocks before allocation. 2023-09-13 09:48:24 +02:00
kernfs kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR 2023-07-19 16:36:33 +02:00
lockd fs: lockd: avoid possible wrong NULL parameter 2023-09-13 09:48:24 +02:00
minix
netfs crypto, cifs: fix error handling in extract_iter_to_sg() 2023-08-23 17:32:23 +02:00
nfs pNFS: Fix assignment of xprtdata.cred 2023-09-13 09:48:25 +02:00
nfs_common
nfsd NFSD: da_addr_body field missing in some GETDEVICEINFO replies 2023-09-13 09:48:24 +02:00
nilfs2 nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse 2023-09-06 21:25:32 +01:00
nls fs/nls: make load_nls() take a const parameter 2023-09-13 09:47:51 +02:00
notify fanotify: disallow mount/sb marks on kernel internal pseudo fs 2023-07-19 16:36:48 +02:00
ntfs
ntfs3 fs/ntfs3: Alternative boot if primary boot is corrupted 2023-08-23 17:32:33 +02:00
ocfs2 fs: ocfs2: namei: check return value of ocfs2_add_entry() 2023-09-13 09:48:05 +02:00
omfs
openpromfs
orangefs - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
overlayfs ovl: Always reevaluate the file signature for IMA 2023-09-13 09:47:52 +02:00
proc procfs: block chmod on /proc/thread-self/comm 2023-09-13 09:48:41 +02:00
pstore pstore/ram: Add check for kstrdup 2023-07-19 16:35:20 +02:00
qnx4
qnx6
quota quota: fix dqput() to follow the guarantees dquot_srcu should provide 2023-09-13 09:48:09 +02:00
ramfs shmem: use ramfs_kill_sb() for kill_sb method of ramfs-based tmpfs 2023-07-19 16:36:54 +02:00
reiserfs reiserfs: Check the return value from __getblk() 2023-09-13 09:47:56 +02:00
romfs
smb cifs: fix charset issue in reconnection 2023-09-13 09:47:51 +02:00
squashfs
sysfs
sysv fs/sysv: Null check to prevent null-ptr-deref bug 2023-08-11 12:14:24 +02:00
tracefs
ubifs
udf udf: Fix uninitialized array access for some pathnames 2023-07-27 08:56:44 +02:00
ufs
unicode
vboxsf
verity fsverity: don't use bio_first_page_all() in fsverity_verify_bio() 2023-07-19 16:35:08 +02:00
xfs xfs: collect errors from inodegc for unlinked inode recovery 2023-06-05 14:48:15 +10:00
zonefs
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_elf.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:12:40 +02:00
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c fork, vhost: Use CLONE_THREAD to fix freezer/ps regression 2023-06-01 17:15:33 -04:00
d_path.c
dax.c
dcache.c
direct-io.c
drop_caches.c
eventfd.c eventfd: prevent underflow for eventfd semaphores 2023-09-13 09:47:57 +02:00
eventpoll.c epoll: ep_autoremove_wake_function should use list_del_init_careful 2023-06-12 11:31:52 -07:00
exec.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:12:40 +02:00
fcntl.c
fhandle.c
file.c file: reinstate f_pos locking optimization for regular files 2023-08-11 12:14:24 +02:00
file_table.c
filesystems.c
fs-writeback.c for-6.4/block-2023-05-06 2023-05-06 08:28:58 -07:00
fs_context.c vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing 2023-09-13 09:47:57 +02:00
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c fs: Establish locking order for unrelated directories 2023-07-19 16:36:55 +02:00
internal.h fs: Establish locking order for unrelated directories 2023-07-19 16:36:55 +02:00
ioctl.c
Kconfig smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00
Kconfig.binfmt
kernel_read_file.c
libfs.c
locks.c
Makefile smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c fs: Fix error checking for d_hash_and_lookup() 2023-09-13 09:47:57 +02:00
namespace.c
no-block.c
nsfs.c
open.c open: make RESOLVE_CACHED correctly test for O_TMPFILE 2023-08-11 12:14:23 +02:00
pipe.c pipe: check for IOCB_NOWAIT alongside O_NONBLOCK 2023-05-12 17:17:27 +02:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c splice: fsnotify_access(in), fsnotify_modify(out) on success in tee 2023-09-13 09:47:56 +02:00
stack.c
stat.c
statfs.c statfs: enforce statfs[64] structure initialization 2023-05-17 15:20:17 +02:00
super.c fs: Protect reconfiguration of sb read-write from racing writes 2023-08-11 12:14:25 +02:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c mm/uffd: allow vma to merge as much as possible 2023-06-12 11:31:50 -07:00
utimes.c
xattr.c fs: don't call posix_acl_listxattr in generic_listxattr 2023-05-17 15:25:20 +02:00