linux-stable/fs
David Howells 15f1ce879e 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-11 19:39:31 +02:00
..
9p
adfs
affs
afs afs: Fix waiting for writeback then skipping folio 2023-06-28 11:13:58 +02:00
autofs
befs
bfs
btrfs btrfs: fix file_offset for REQ_BTRFS_ONE_ORDERED bios that get split 2023-07-11 19:39:23 +02:00
cachefiles
ceph ceph: fix use-after-free bug for inodes when flushing capsnaps 2023-06-14 11:16:57 +02:00
cifs smb3: missing null check in SMB2_change_notify 2023-06-28 11:14:18 +02:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten 2023-05-11 23:16:53 +09:00
ecryptfs
efivarfs
efs
erofs erofs: fix compact 4B support for 16k block size 2023-07-11 19:39:23 +02:00
exfat
exportfs
ext2 ext2: Check block size validity during mount 2023-05-24 17:30:04 +01:00
ext4 ext4: drop the call to ext4_error() from ext4_get_group_info() 2023-06-21 16:02:17 +02:00
f2fs f2fs: relax sanity check if checkpoint is corrupted 2023-05-24 17:30:07 +01:00
fat
freevxfs
fscache
fuse
gfs2 gfs2: Don't get stuck writing page onto itself under direct I/O 2023-06-28 11:14:21 +02:00
hfs
hfsplus fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode() 2023-05-24 17:30:00 +01:00
hostfs
hpfs
hugetlbfs
iomap
isofs
jbd2 jdb2: Don't refuse invalidation of already invalidated buffers 2023-05-11 23:17:18 +09:00
jffs2
jfs
kernfs
ksmbd ksmbd: call putname after using the last component 2023-06-28 11:14:25 +02:00
lockd lockd: drop inappropriate svc_get() from locked_get() 2023-07-11 19:39:21 +02:00
minix
netfs netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC 2023-04-12 09:26:36 -07:00
nfs nfs: don't report STATX_BTIME in ->getattr 2023-07-05 18:29:23 +01:00
nfs_common
nfsd nfsd: fix double fget() bug in __write_ports_addfd() 2023-06-09 10:47:54 +02:00
nilfs2 nilfs2: prevent general protection fault in nilfs_clear_dirty_page() 2023-06-28 11:14:04 +02:00
nls
notify inotify: Avoid reporting event with invalid wd 2023-05-17 14:01:55 +02:00
ntfs
ntfs3 fs/ntfs3: Fix a possible null-pointer dereference in ni_clear() 2023-05-24 17:30:11 +01:00
ocfs2 ocfs2: Fix use of slab data with sendpage 2023-07-11 19:39:31 +02:00
omfs
openpromfs
orangefs
overlayfs
proc sysctl: clarify register_sysctl_init() base directory order 2023-05-17 14:01:56 +02:00
pstore pstore/ram: Add check for kstrdup 2023-07-11 19:39:26 +02:00
qnx4
qnx6
quota
ramfs
reiserfs reiserfs: Add security prefix to xattr name in reiserfs_security_write() 2023-05-11 23:16:50 +09:00
romfs
smbfs_common
squashfs
sysfs
sysv
tracefs
ubifs ubifs: Fix memory leak in do_rename 2023-05-11 23:16:53 +09:00
udf
ufs
unicode
vboxsf
verity fsverity: explicitly check for buffer overflow in build_merkle_tree() 2023-05-01 08:32:25 +09:00
xfs xfs: verify buffer contents when we skip log replay 2023-06-09 10:48:25 +02:00
zonefs
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_elf.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:14:46 +02:00
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c fsdax: force clear dirty mark if CoW 2023-04-05 18:06:23 -07:00
dcache.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c epoll: ep_autoremove_wake_function should use list_del_init_careful 2023-06-21 16:02:08 +02:00
exec.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:14:46 +02:00
fcntl.c
fhandle.c
file.c
file_table.c
filesystems.c
fs-writeback.c writeback: fix call of incorrect macro 2023-05-17 14:01:40 +02:00
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c
internal.h ksmbd: remove internal.h include 2023-06-28 11:14:09 +02:00
ioctl.c
Kconfig
Kconfig.binfmt
kernel_read_file.c
libfs.c
locks.c
Makefile fs: fix sysctls.c built 2023-05-11 23:16:49 +09:00
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c ksmbd: fix racy issue from using ->d_parent and ->d_name 2023-06-28 11:14:10 +02:00
namespace.c
no-block.c
nsfs.c
open.c open: return EINVAL for O_DIRECTORY | O_CREAT 2023-05-24 17:30:00 +01:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c splice: don't call file_accessed in copy_splice_read 2023-07-11 19:39:23 +02:00
stack.c
stat.c
statfs.c statfs: enforce statfs[64] structure initialization 2023-05-24 17:30:22 +01:00
super.c
sync.c
sysctls.c
timerfd.c
userfaultfd.c mm/uffd: fix vma operation where start addr cuts part of vma 2023-06-21 16:02:08 +02:00
utimes.c
xattr.c