Skip to content
Commit 618f0031 authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Theodore Ts'o
Browse files

ext4: fix memory leak in ext4_fill_super



static int kthread(void *_create) will return -ENOMEM
or -EINTR in case of internal failure or
kthread_stop() call happens before threadfn call.

To prevent fancy error checking and make code
more straightforward we moved all cleanup code out
of kmmpd threadfn.

Also, dropped struct mmpd_data at all. Now struct super_block
is a threadfn data and struct buffer_head embedded into
struct ext4_sb_info.

Reported-by: default avatar <syzbot+d9e482e303930fa4f6ff@syzkaller.appspotmail.com>
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/20210430185046.15742-1-paskripkin@gmail.com
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 1fc57ca5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment