dm thin metadata: Avoid returning cmd->bm wild pointer on error
authorYe Bin <yebin10@huawei.com>
Tue, 1 Sep 2020 06:25:43 +0000 (14:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:03:12 +0000 (19:03 +0200)
commiteb71cd253b2adfbcb1f09636d18ee6394d6f774d
tree8df0ca7b3759ba32c715e4fc3c8c932a1cabec23
parentdd20b2c464a7b2db15126d3db2b69b4354b88f02
dm thin metadata: Avoid returning cmd->bm wild pointer on error

commit 219403d7e56f9b716ad80ab87db85d29547ee73e upstream.

Maybe __create_persistent_data_objects() caller will use PTR_ERR as a
pointer, it will lead to some strange things.

Signed-off-by: Ye Bin <yebin10@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-thin-metadata.c