aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorArtem Savkov2016-07-21 13:32:04 +0200
committerTrond Myklebust2016-07-22 15:14:21 -0400
commit297fae4d0bee5d683533f3324baf1b363e7b48bf (patch)
treedcb38bff8298ea9cb0dd8bfcccb42d05c83372ba /drivers/iio/adc
parentc77efc1e7884c818ba67ec36b08e220202d9428c (diff)
Fix NULL pointer dereference in bl_free_device().
When bl_parse_deviceid() fails in bl_alloc_deviceid_node() on blkdev_get_by_*() step we get an pnfs_block_dev struct that is uninitialized except for bdev field which is set to whatever error blkdev_get_by_*() returns. bl_free_device() then tries to call blkdev_put() if bdev is not 0 resulting in a wrong pointer dereference. Fixing this by setting bdev in struct pnfs_block_dev only if we didn't get an error from blkdev_get_by_*(). Signed-off-by: Artem Savkov <asavkov@redhat.com> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'drivers/iio/adc')
0 files changed, 0 insertions, 0 deletions