]> git.baikalelectronics.ru Git - kernel.git/commit
um: Fix for a possible OOPS in ubd initialization
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Tue, 26 Feb 2019 15:55:25 +0000 (15:55 +0000)
committerRichard Weinberger <richard@nod.at>
Wed, 6 Mar 2019 21:39:18 +0000 (22:39 +0100)
commit85d84127be4babba459573a37e8f4e2e78d9d763
tree198e7e45ab8ae97a1a6df74279e8c41133a39a29
parenta74e7b89ae0dab0cfaee49c3743771a8c4594f2a
um: Fix for a possible OOPS in ubd initialization

If the ubd device failed to allocate a queue during
initialization it tried call blk_cleanup_queue resulting
in an oops.

This patch simplifies the cleanup logic and ensures that
blk_queue_cleanup is called only if there is a valid queue.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/ubd_kern.c