dm thin metadata: Avoid returning cmd->bm wild pointer on error
commit41718a868f611b386bc53d167518375563f456b1
authorYe Bin <yebin10@huawei.com>
Tue, 1 Sep 2020 06:25:43 +0000 (1 14:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 09:47:37 +0000 (12 11:47 +0200)
tree313baa9de48c415ed70df7c259a4a04547e34eeb
parent1c1630436a53ebf2cec68c120f2200422d89f0b0
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