linux-stable/fs/dlm
Alexander Aring 9667854e69 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:43:02 +02:00
..
ast.c fs: dlm: LSFL_CB_DELAY only for kernel lockspaces 2022-08-23 15:02:46 -05:00
ast.h fs: dlm: remove dlm_del_ast prototype 2022-08-23 14:54:01 -05:00
config.c fs: dlm: don't use deprecated timeout features by default 2022-08-01 09:31:38 -05:00
config.h fs: dlm: don't use deprecated timeout features by default 2022-08-01 09:31:38 -05:00
debug_fs.c fs: dlm: fix potential buffer overflow 2021-11-12 09:38:19 -06:00
dir.c dlm: use __le types for dlm header 2022-04-06 14:02:28 -05:00
dir.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
dlm_internal.h fs: dlm: change ls_clear_proc_locks to spinlock 2022-08-23 14:54:02 -05:00
Kconfig fs: dlm: add deprecation Kconfig and warnings for timeouts 2022-08-01 09:31:32 -05:00
lock.c fd: dlm: trace send/recv of dlm message and rcom 2023-03-17 08:50:18 +01:00
lock.h fs: dlm: const void resource name parameter 2022-08-23 15:02:47 -05:00
lockspace.c fs: dlm: revert check required context while close 2023-07-23 13:49:34 +02:00
lockspace.h fs: dlm: revert check required context while close 2023-07-23 13:49:34 +02:00
lowcomms.c fs: dlm: add midcomms init/start functions 2023-03-17 08:50:18 +01:00
lowcomms.h fs: dlm: add midcomms init/start functions 2023-03-17 08:50:18 +01:00
lvb_table.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
main.c fs: dlm: add midcomms init/start functions 2023-03-17 08:50:18 +01:00
Makefile fs: dlm: don't use deprecated timeout features by default 2022-08-01 09:31:38 -05:00
member.c fs: dlm: make new_lockspace() wait until recovery completes 2022-06-24 11:57:47 -05:00
member.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
memory.c fs: dlm: memory cache for lowcomms hotpath 2021-12-07 12:42:26 -06:00
memory.h fs: dlm: memory cache for lowcomms hotpath 2021-12-07 12:42:26 -06:00
midcomms.c fs: dlm: revert check required context while close 2023-07-23 13:49:34 +02:00
midcomms.h fd: dlm: trace send/recv of dlm message and rcom 2023-03-17 08:50:18 +01:00
netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
plock.c dlm: fix plock lookup when using multiple lockspaces 2023-09-13 09:43:02 +02:00
rcom.c fd: dlm: trace send/recv of dlm message and rcom 2023-03-17 08:50:18 +01:00
rcom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
recover.c dlm: replace usage of found with dedicated list iterator variable 2022-04-06 14:03:14 -05:00
recover.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
recoverd.c fs: dlm: handle recovery result outside of ls_recover 2022-06-24 11:57:48 -05:00
recoverd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
requestqueue.c dlm: use __le types for dlm messages 2022-04-06 14:02:37 -05:00
requestqueue.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
user.c fs: dlm: remove DLM_LSFL_FS from uapi 2022-08-23 14:54:54 -05:00
user.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193 2019-05-30 11:29:21 -07:00
util.c dlm: use __le types for dlm messages 2022-04-06 14:02:37 -05:00
util.h dlm: use __le types for dlm messages 2022-04-06 14:02:37 -05:00