]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
authorVasily Averin <vvs@virtuozzo.com>
Wed, 7 Nov 2018 16:10:21 +0000 (11:10 -0500)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:59:16 +0000 (19:59 -0600)
BugLink: https://bugs.launchpad.net/bugs/1836802
commit 6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f upstream.

Fixes: 3f2571c1f91f ("ext4: factor out xattr moving")
Fixes: 6dd4ee7cab7e ("ext4: Expand extra_inodes space per ...")
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 2.6.23
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/ext4/xattr.c

index 49b3d9b038e02902dbbbab8b794cf6a0fc8765c9..da46b51629378b2a03413abdfaa617fc4d0fb8c1 100644 (file)
@@ -2626,6 +2626,8 @@ out:
        kfree(buffer);
        if (is)
                brelse(is->iloc.bh);
+       if (bs)
+               brelse(bs->bh);
        kfree(is);
        kfree(bs);