android_kernel_xiaomi_sm8350/fs/dlm
Alexander Aring 1c675c937c dlm: fix plock lookup when using multiple lockspaces
commit 7c53e847ff5e97f033fdd31f71949807633d506b 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: 57e2c2f2d94c ("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-23 10:59:55 +02:00
..
ast.c fs: dlm: fix race between test_bit() and queue_work() 2022-10-26 13:22:14 +02:00
ast.h Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
config.c fs: dlm: fix memory leak when fenced 2021-07-14 16:53:17 +02:00
config.h
debug_fs.c
dir.c
dir.h
dlm_internal.h
Kconfig
lock.c dlm: replace usage of found with dedicated list iterator variable 2023-08-30 16:27:20 +02:00
lock.h Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
lockspace.c
lockspace.h
lowcomms.c
lowcomms.h
lvb_table.h
main.c
Makefile
member.c
member.h
memory.c
memory.h Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
midcomms.c
midcomms.h
netlink.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
plock.c dlm: fix plock lookup when using multiple lockspaces 2023-09-23 10:59:55 +02:00
rcom.c
rcom.h
recover.c dlm: replace usage of found with dedicated list iterator variable 2023-08-30 16:27:20 +02:00
recover.h Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
recoverd.c
recoverd.h
requestqueue.c
requestqueue.h
user.c
user.h
util.c
util.h