[PATCH next] ntfs3: Remove redundant nls free

Edward Adam Davis posted 1 patch 3 months, 1 week ago
fs/ntfs3/super.c | 1 -
1 file changed, 1 deletion(-)
[PATCH next] ntfs3: Remove redundant nls free
Posted by Edward Adam Davis 3 months, 1 week ago
Using unload_nls() is sufficient for nls.

syzbot reported:
WARNING: mm/slub.c:6752 at free_large_kmalloc+0x15c/0x1f0 mm/slub.c:6752, CPU#1: syz-executor/5939
Call Trace:
 ntfs_put_super+0x15b/0x1b0 fs/ntfs3/super.c:708
 generic_shutdown_super+0x135/0x2c0 fs/super.c:642
 kill_block_super+0x44/0x90 fs/super.c:1722
 ntfs3_kill_sb+0x44/0x1b0 fs/ntfs3/super.c:1847

Reported-by: syzbot+cc433e4cd6d54736bf80@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=cc433e4cd6d54736bf80
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
 fs/ntfs3/super.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index aae1f32f4dab..02b03d810dcf 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -705,7 +705,6 @@ static void ntfs_put_super(struct super_block *sb)
 
 	if (sbi->options) {
 		unload_nls(sbi->options->nls);
-		kfree(sbi->options->nls);
 		kfree(sbi->options);
 		sbi->options = NULL;
 	}
-- 
2.43.0