linux-stable/fs/dlm
Alexander Aring 7a2978e8d3 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-19 12:22:52 +02:00
..
Kconfig
Makefile
ast.c fs: dlm: fix race between test_bit() and queue_work() 2022-10-26 12:34:20 +02:00
ast.h
config.c fs: dlm: rename socket and app buffer defines 2021-06-02 11:53:04 -05:00
config.h fs: dlm: rename socket and app buffer defines 2021-06-02 11:53:04 -05:00
debug_fs.c fs: dlm: add midcomms debugfs functionality 2021-05-25 09:22:20 -05:00
dir.c fs: dlm: fix return -EINTR on recovery stopped 2021-08-19 11:33:03 -05:00
dir.h
dlm_internal.h fs: dlm: fix typo in tlv prefix 2021-07-19 11:53:43 -05:00
lock.c dlm: replace usage of found with dedicated list iterator variable 2023-08-30 16:18:11 +02:00
lock.h
lockspace.c fs: dlm: start midcomms before scand 2023-03-17 08:48:50 +01:00
lockspace.h
lowcomms.c fs: dlm: add midcomms init/start functions 2023-03-17 08:48:49 +01:00
lowcomms.h fs: dlm: add midcomms init/start functions 2023-03-17 08:48:49 +01:00
lvb_table.h
main.c fs: dlm: add midcomms init/start functions 2023-03-17 08:48:49 +01:00
member.c fs: dlm: fix return -EINTR on recovery stopped 2021-08-19 11:33:03 -05:00
member.h
memory.c
memory.h
midcomms.c fs: dlm: add midcomms init/start functions 2023-03-17 08:48:49 +01:00
midcomms.h fs: dlm: add midcomms init/start functions 2023-03-17 08:48:49 +01:00
netlink.c
plock.c dlm: fix plock lookup when using multiple lockspaces 2023-09-19 12:22:52 +02:00
rcom.c fs: dlm: cleanup and remove _send_rcom 2021-07-19 11:53:43 -05:00
rcom.h
recover.c dlm: replace usage of found with dedicated list iterator variable 2023-08-30 16:18:11 +02:00
recover.h
recoverd.c fs: dlm: fix return -EINTR on recovery stopped 2021-08-19 11:33:03 -05:00
recoverd.h
requestqueue.c
requestqueue.h
user.c
user.h
util.c fs: dlm: add union in dlm header for lockspace id 2021-05-25 09:22:20 -05:00
util.h fs: dlm: public header in out utility 2021-05-25 09:22:20 -05:00