]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: add missing cleanup in raid_ctr()
authorWenwen Wang <wenwen@cs.uga.edu>
Mon, 19 Aug 2019 00:18:34 +0000 (19:18 -0500)
committerMike Snitzer <snitzer@redhat.com>
Wed, 21 Aug 2019 15:47:05 +0000 (11:47 -0400)
commitfaf224c732341924e2e499a6db7e7ee0c0382c9c
tree1b1bcd524944340fb94f35354956f0334dd38a6d
parent5da1b9e2525c58ada0e167e464ac704d8c6e844b
dm raid: add missing cleanup in raid_ctr()

If rs_prepare_reshape() fails, no cleanup is executed, leading to
leak of the raid_set structure allocated at the beginning of
raid_ctr(). To fix this issue, go to the label 'bad' if the error
occurs.

Fixes: 1189d68f91da2 ("dm raid: stop keeping raid set frozen altogether")
Cc: stable@vger.kernel.org
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c