diff options
| author | Jan Kara <jack@suse.cz> | 2017-03-17 19:57:15 +0530 |
|---|---|---|
| committer | Ritesh Harjani <riteshh@codeaurora.org> | 2017-04-04 14:12:56 +0530 |
| commit | 70c8d6d632f886ef3a59cb9afa36f0af1df1a7eb (patch) | |
| tree | 8284c43d01948ba70a7cbd0d3c000038d04219be /net/unix/af_unix.c | |
| parent | 9af69213de642f19b19f77e04f23de9f66b6b0f0 (diff) | |
block: Make del_gendisk() safer for disks without queues
commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()"
added disk->queue dereference to del_gendisk(). Although del_gendisk()
is not supposed to be called without disk->queue valid and
blk_unregister_queue() warns in that case, this change will make it oops
instead. Return to the old more robust behavior of just warning when
del_gendisk() gets called for gendisk with disk->queue being NULL.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Tested-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Git-commit: 90f16fddcc2802726142b8386c65ccb89f044613
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Change-Id: I5ae377b2ace64d7a133979e656beb0eba45abc09
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
