]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ntfs3: put resources during ntfs_fill_super()
authorChristian Brauner <brauner@kernel.org>
Mon, 25 Sep 2023 11:08:52 +0000 (13:08 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 25 Sep 2023 12:12:42 +0000 (14:12 +0200)
During ntfs_fill_super() some resources are allocated that we need to
cleanup in ->put_super() such as additional inodes. When
ntfs_fill_super() fails these resources need to be cleaned up as well.

Reported-by: syzbot+2751da923b5eb8307b0b@syzkaller.appspotmail.com
Fixes: 78a06688a4d4 ("ntfs3: drop inode references in ntfs_put_super()")
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/ntfs3/super.c

index cfec5e0c7f66ae923ab13dc18e88d4cba86b7478..5661a363005ee09d5cf1f453658bd5c0415dd43f 100644 (file)
@@ -1562,6 +1562,7 @@ load_root:
 put_inode_out:
        iput(inode);
 out:
+       ntfs3_put_sbi(sbi);
        kfree(boot2);
        return err;
 }