uniontech inclusion category: bugfix bugzilla: NA CVE: NA
-------------------
After alloc the sbi->persisters memory, dep_init will call dep_fini when error happened.Because sbi->persisters is not set to 0, kthread_stop may happened error.
Signed-off-by: Gou Hao gouhao@uniontech.com --- fs/eulerfs/dep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/eulerfs/dep.c b/fs/eulerfs/dep.c index da826a18fa31..62fd1376f980 100644 --- a/fs/eulerfs/dep.c +++ b/fs/eulerfs/dep.c @@ -728,8 +728,8 @@ int dep_init(struct super_block *sb) node_num++;
sbi->persister_num = node_num * persisters_per_socket; - - sbi->persisters = kmalloc(sizeof(struct task_struct *) * + + sbi->persisters = kzalloc(sizeof(struct task_struct *) * sbi->persister_num, GFP_KERNEL); if (!sbi->persisters) { err = -ENOMEM;