linux-stable/fs/ocfs2/cluster
David Howells 9b5fd0d08d ocfs2: Fix use of slab data with sendpage
[ Upstream commit 86d7bd6e66 ]

ocfs2 uses kzalloc() to allocate buffers for o2net_hand, o2net_keep_req and
o2net_keep_resp and then passes these to sendpage.  This isn't really
allowed as the lifetime of slab objects is not controlled by page ref -
though in this case it will probably work.  sendmsg() with MSG_SPLICE_PAGES
will, however, print a warning and give an error.

Fix it to use folio_alloc() instead to allocate a buffer for the handshake
message, keepalive request and reply messages.

Fixes: 98211489d4 ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Mark Fasheh <mark@fasheh.com>
cc: Kurt Hackel <kurt.hackel@oracle.com>
cc: Joel Becker <jlbec@evilplan.org>
cc: Joseph Qi <joseph.qi@linux.alibaba.com>
cc: ocfs2-devel@oss.oracle.com
Link: https://lore.kernel.org/r/20230623225513.2732256-14-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:35:36 +02:00
..
heartbeat.c ocfs2: use bitmap API in fill_node_map 2022-11-18 13:55:06 -08:00
heartbeat.h ocfs2: use bitmap API in fill_node_map 2022-11-18 13:55:06 -08:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
masklog.c ocfs2: cluster: use default_groups in kobj_type 2022-01-15 16:30:24 +02:00
masklog.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
netdebug.c ocfs2: use bitmap API in fill_node_map 2022-11-18 13:55:06 -08:00
nodemanager.c ocfs2/cluster: use bitmap API instead of hand-writing it 2022-11-18 13:55:06 -08:00
nodemanager.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
ocfs2_heartbeat.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
ocfs2_nodemanager.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
quorum.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
quorum.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
sys.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
sys.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
tcp.c ocfs2: Fix use of slab data with sendpage 2023-07-19 16:35:36 +02:00
tcp.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
tcp_internal.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00