summaryrefslogtreecommitdiff
path: root/drivers/oprofile/oprofile_stats.c
diff options
context:
space:
mode:
authorVasilis Liaskovitis <vliaskovitis@suse.com>2018-10-15 16:25:08 +0300
committerJens Axboe <axboe@kernel.dk>2018-10-25 20:17:39 +0300
commitf92898e7f32e3533bfd95be174044bc349d416ca (patch)
tree82d1f273e4246f03896141852cb4bf54f514ca70 /drivers/oprofile/oprofile_stats.c
parent3acbd2de6bc3af215c6ed7732dfc097d1e238503 (diff)
downloadlinux-f92898e7f32e3533bfd95be174044bc349d416ca.tar.xz
xen/blkfront: avoid NULL blkfront_info dereference on device removal
If a block device is hot-added when we are out of grants, gnttab_grant_foreign_access fails with -ENOSPC (log message "28 granting access to ring page") in this code path: talk_to_blkback -> setup_blkring -> xenbus_grant_ring -> gnttab_grant_foreign_access and the failing path in talk_to_blkback sets the driver_data to NULL: destroy_blkring: blkif_free(info, 0); mutex_lock(&blkfront_mutex); free_info(info); mutex_unlock(&blkfront_mutex); dev_set_drvdata(&dev->dev, NULL); This results in a NULL pointer BUG when blkfront_remove and blkif_free try to access the failing device's NULL struct blkfront_info. Cc: stable@vger.kernel.org # 4.5 and later Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/oprofile/oprofile_stats.c')
0 files changed, 0 insertions, 0 deletions