]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs/raid56: fix and cleanup some error paths
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 22 Jul 2013 06:55:15 +0000 (09:55 +0300)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:04:26 +0000 (08:04 -0400)
commit051b38587a8f5b90c4b2bfb59fb4bc34fe984745
tree148c006bde1ff423c9623e33ccd1d45ae16688fd
parent00a04fa1849fd1b03a250973dd9c8769e8c659f5
btrfs/raid56: fix and cleanup some error paths

The alloc_rbio() frees "raid_map" and "bbio" on error, so there is a
potential double free bug in raid56_parity_write().  The
raid56_parity_write() and raid56_parity_recover() functions should still
free "raid_map" and "bbio" on error if other errors occur though, so I
have added some more calls to kfree().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/raid56.c