[lvc-project] [PATCH] ocfs2: fix memory leak in ocfs2_merge_rec_left()
Heming Zhao
heming.zhao at suse.com
Fri Dec 5 10:05:44 MSK 2025
On Fri, Dec 05, 2025 at 09:51:59AM +0300, Dmitry Antipov wrote:
> In 'ocfs2_merge_rec_left()', do not reset 'left_path' to NULL after
> move, thus allowing 'ocfs2_free_path()' to free it before return.
>
> Reported-by: syzbot+cfc7cab3bb6eaa7c4de2 at syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=cfc7cab3bb6eaa7c4de2
> Fixes: 677b975282e4 ("ocfs2: Add support for cross extent block")
> Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
LGTM.
Reviewed-by: Heming Zhao <heming.zhao at suse.com>
> ---
> fs/ocfs2/alloc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
> index b267ec580da9..0ab9b06643f4 100644
> --- a/fs/ocfs2/alloc.c
> +++ b/fs/ocfs2/alloc.c
> @@ -3654,7 +3654,6 @@ static int ocfs2_merge_rec_left(struct ocfs2_path *right_path,
> * So we use the new rightmost path.
> */
> ocfs2_mv_path(right_path, left_path);
> - left_path = NULL;
> } else
> ocfs2_complete_edge_insert(handle, left_path,
> right_path, subtree_index);
> --
> 2.52.0
>
>
More information about the lvc-project
mailing list