block: xen-blkfront: Fix possible NULL ptr dereference
authorFelipe Pena <felipensp@gmail.com>
Sat, 9 Nov 2013 15:36:09 +0000 (13:36 -0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 26 Nov 2013 16:24:01 +0000 (11:24 -0500)
commit2f089cb89d2f47702c31bd584c12badc88bbe17c
tree3041158a5ba7d03f4f4f93197c86095794a585b6
parent427bfe07e6744c058ce6fc4aa187cda96b635539
block: xen-blkfront: Fix possible NULL ptr dereference

In the blkif_release function the bdget_disk() call might returns
a NULL ptr which might be dereferenced on bdev->bd_openers checking

Signed-off-by: Felipe Pena <felipensp@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v2: Added WARN per Roger's suggestion]
drivers/block/xen-blkfront.c