dm cache metadata: Avoid returning cmd->bm wild pointer on error
authorYe Bin <yebin10@huawei.com>
Tue, 1 Sep 2020 06:25:42 +0000 (14:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 09:47:37 +0000 (11:47 +0200)
commit1c1630436a53ebf2cec68c120f2200422d89f0b0
tree883b51f3403a1e901f8f63eca1cc14c4aa7bfe9f
parent8c36cde29ad1e563def83c41094a96027b7a9b1b
dm cache metadata: Avoid returning cmd->bm wild pointer on error

commit d16ff19e69ab57e08bf908faaacbceaf660249de 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-cache-metadata.c