linux-yocto/fs/ocfs2
Dan Carpenter 694d5b4010 ocfs2: fix double free in user_cluster_connect()
[ Upstream commit 8f45f089337d924db24397f55697cda0e6960516 ]

user_cluster_disconnect() frees "conn->cc_private" which is "lc" but then
the error handling frees "lc" a second time.  Set "lc" to NULL on this
path to avoid a double free.

Link: https://lkml.kernel.org/r/aNKDz_7JF7aycZ0k@stanley.mountain
Fixes: c994c2ebdb ("ocfs2: use the new DLM operation callbacks while requesting new lockspace")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 12:00:18 +02:00
..
cluster introduce fd_file(), convert all accessors to it. 2024-08-12 22:00:43 -04:00
dlm
dlmfs
acl.c
acl.h
alloc.c ocfs2: validate l_tree_depth to avoid out-of-bounds access 2025-04-10 14:39:24 +02:00
alloc.h
aops.c ocfs2: fix uninit-value in ocfs2_get_block() 2024-09-26 14:01:45 -07:00
aops.h ocfs2: fix uninitialized value in ocfs2_file_read_iter() 2024-12-05 14:02:13 +01:00
blockcheck.c
blockcheck.h
buffer_head_io.c ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate 2024-09-09 15:15:54 -07:00
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: check dir i_size in ocfs2_find_entry 2025-02-17 10:05:48 +01:00
dir.h
dlmglue.c ocfs2: update seq_file index in ocfs2_dlm_seq_next 2024-12-14 20:03:31 +01:00
dlmglue.h
export.c
export.h
extent_map.c ocfs2: fix recursive semaphore deadlock in fiemap call 2025-09-19 16:35:45 +02:00
extent_map.h
file.c ocfs2: fix uninitialized value in ocfs2_file_read_iter() 2024-12-05 14:02:13 +01:00
file.h ocfs2: store cookie in private data 2024-09-12 11:58:44 +02:00
filecheck.c
filecheck.h
heartbeat.c
heartbeat.h
inode.c ocfs2: prevent release journal inode after journal shutdown 2025-09-09 18:58:16 +02:00
inode.h
ioctl.c
ioctl.h
journal.c fs/ocfs2: use sleeping version of __find_get_block() 2025-05-29 11:02:00 +02:00
journal.h ocfs2: stop quota recovery before disabling quotas 2025-05-18 08:24:54 +02:00
Kconfig
localalloc.c ocfs2: fix the space leak in LA when releasing LA 2024-12-27 14:02:18 +01:00
localalloc.h
locks.c
locks.h
Makefile
mmap.c fs: Convert aops->write_begin to take a folio 2024-08-07 11:33:21 +02:00
mmap.h
move_extents.c
move_extents.h
namei.c ocfs2: free inode when ocfs2_get_init_inode() fails 2024-12-14 20:03:18 +01:00
namei.h
ocfs1_fs_compat.h
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: fix DIO failure due to insufficient transaction credits 2024-06-24 20:52:10 -07:00
ocfs2.h ocfs2: stop quota recovery before disabling quotas 2025-05-18 08:24:54 +02:00
quota_global.c ocfs2: mark dquot as inactive if failed to start trans while releasing dquot 2025-02-08 09:57:58 +01:00
quota_local.c ocfs2: fix possible memory leak in ocfs2_finish_quota_recovery 2025-06-19 15:32:01 +02:00
quota.h
refcounttree.c ocfs2: reserve space for inline xattr before attaching reflink tree 2024-09-26 14:01:44 -07:00
refcounttree.h
reservations.c
reservations.h
resize.c ocfs2: uncache inode which has failed entering the group 2024-11-14 22:43:48 -08:00
resize.h
slot_map.c
slot_map.h
stack_o2cb.c ocfs2: constify struct ocfs2_stack_operations 2024-06-24 22:25:10 -07:00
stack_user.c ocfs2: fix double free in user_cluster_connect() 2025-10-15 12:00:18 +02:00
stackglue.c
stackglue.h ocfs2: constify struct ocfs2_stack_operations 2024-06-24 22:25:10 -07:00
suballoc.c ocfs2: fix the issue with discontiguous allocation in the global_bitmap 2025-05-18 08:24:54 +02:00
suballoc.h ocfs2: fix the issue with discontiguous allocation in the global_bitmap 2025-05-18 08:24:54 +02:00
super.c ocfs2: stop quota recovery before disabling quotas 2025-05-18 08:24:54 +02:00
super.h
symlink.c ocfs2: handle a symlink read error correctly 2025-02-17 10:05:39 +01:00
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove() 2024-11-07 14:14:59 -08:00
xattr.h