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:14:32 +0000 (19:14 +0200)
commitb3c76fdbb11988c5775b684980aabc02886e5d41
tree9414a2b4097bb7b9924dbb5d19c93e0e589773f2
parentd02a33a248258cc0c2803f7af318ddcd8d83ba16
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