linux-stable/fs/ocfs2
David Howells 94817712b5 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:21:13 +02:00
..
cluster ocfs2: Fix use of slab data with sendpage 2023-07-19 16:21:13 +02:00
dlm
dlmfs ocfs2: kill EBUSY from dlmfs_evict_inode 2022-06-16 19:58:20 -07:00
acl.c
acl.h
alloc.c ocfs2: Convert ocfs2 to read_folio 2022-05-09 16:21:46 -04:00
alloc.h
aops.c ocfs2: fix data corruption after failed write 2023-03-22 13:34:02 +01:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c fs/buffer: Combine two submit_bh() and ll_rw_block() arguments 2022-07-14 12:14:32 -06:00
buffer_head_io.h
dcache.c
dcache.h
dir.c Change calling conventions for filldir_t 2022-08-17 17:25:04 -04:00
dir.h
dlmglue.c ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown 2022-08-28 14:02:45 -07:00
dlmglue.h
export.c
export.h
extent_map.c
extent_map.h
file.c ocfs2: check new file size on fallocate call 2023-06-21 16:00:54 +02:00
file.h
filecheck.c
filecheck.h
heartbeat.c ocfs2: fix a typo in a comment 2022-07-29 18:12:36 -07:00
heartbeat.h
inode.c
inode.h
ioctl.c
ioctl.h
journal.c ocfs2: fix memory leak in ocfs2_mount_volume() 2022-12-31 13:31:58 +01:00
journal.h ocfs2: fix memory leak in ocfs2_mount_volume() 2022-12-31 13:31:58 +01:00
Kconfig
localalloc.c
localalloc.h
locks.c
locks.h
Makefile
mmap.c
mmap.h
move_extents.c ocfs2: fix non-auto defrag path not working issue 2023-03-10 09:34:09 +01:00
move_extents.h
namei.c ocfs2: Switch to security_inode_init_security() 2023-05-30 14:03:17 +01:00
namei.h
ocfs1_fs_compat.h
ocfs2.h Revert "ocfs2: mount shared volume without ha stack" 2022-07-18 15:09:15 -07:00
ocfs2_fs.h ocfs2: replace zero-length arrays with DECLARE_FLEX_ARRAY() helper 2022-10-03 14:21:42 -07:00
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
quota.h
quota_global.c fs/ocfs2: Fix spelling typo in comment 2022-07-17 17:31:43 -07:00
quota_local.c
refcounttree.c fs/ocfs2: fix repeated words in comments 2022-10-03 14:21:43 -07:00
refcounttree.h
reservations.c
reservations.h
resize.c
resize.h
slot_map.c Revert "ocfs2: mount shared volume without ha stack" 2022-07-18 15:09:15 -07:00
slot_map.h
stack_o2cb.c
stack_user.c fs: dlm: remove DLM_LSFL_FS from uapi 2022-08-23 14:54:54 -05:00
stackglue.c ocfs2: fix memory leak in ocfs2_stack_glue_init() 2022-12-31 13:31:56 +01:00
stackglue.h
suballoc.c
suballoc.h fs/ocfs2/suballoc.h: fix spelling typo in comment 2022-10-03 14:21:42 -07:00
super.c ocfs2: fix use-after-free when unmounting read-only filesystem 2023-06-21 16:00:54 +02:00
super.h
symlink.c ocfs2: Convert ocfs2 to read_folio 2022-05-09 16:21:46 -04:00
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: Switch to security_inode_init_security() 2023-05-30 14:03:17 +01:00
xattr.h