android_kernel_motorola_sm6225/fs/dlm
Alexander Aring 10214f9896 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:48:11 +02:00
..
ast.c fs: dlm: fix race between test_bit() and queue_work() 2022-10-26 13:19:21 +02:00
ast.h
config.c fs: dlm: fix memory leak when fenced 2021-07-20 16:15:46 +02:00
config.h dlm: add log_info config option 2016-06-21 09:04:24 -05:00
debug_fs.c fs: dlm: fix debugfs dump 2021-05-22 10:59:39 +02:00
dir.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
dir.h
dlm_internal.h dlm: remove BUG() before panic() 2020-06-25 15:32:56 +02:00
Kconfig
lock.c dlm: replace usage of found with dedicated list iterator variable 2023-08-30 16:31:51 +02:00
lock.h dlm: adopt orphan locks 2014-11-19 14:48:02 -06:00
lockspace.c dlm: Fix kobject memleak 2020-08-19 08:15:02 +02:00
lockspace.h
lowcomms.c fs: dlm: cancel work sync othercon 2021-07-20 16:15:45 +02:00
lowcomms.h
lvb_table.h
main.c dlm: audit and remove any unnecessary uses of module.h 2016-10-19 11:00:03 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
member.c dlm: fix possible call to kfree() for non-initialized pointer 2019-12-13 08:51:14 +01:00
member.h
memory.c dlm: NULL check before kmem_cache_destroy is not needed 2019-12-13 08:52:07 +01:00
memory.h
midcomms.c
midcomms.h
netlink.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
plock.c dlm: fix plock lookup when using multiple lockspaces 2023-09-23 10:48:11 +02:00
rcom.c dlm: remove dlm_send_rcom_lookup_dump 2017-10-09 09:29:31 -05:00
rcom.h dlm: remove dlm_send_rcom_lookup_dump 2017-10-09 09:29:31 -05:00
recover.c dlm: replace usage of found with dedicated list iterator variable 2023-08-30 16:31:51 +02:00
recover.h
recoverd.c dlm: recheck kthread_should_stop() before schedule() 2017-09-25 12:48:10 -05:00
recoverd.h
requestqueue.c
requestqueue.h
user.c dlm: fix invalid cluster name warning 2019-12-13 08:52:23 +01:00
user.h
util.c
util.h