summaryrefslogtreecommitdiff
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-07-07 05:13:42 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-07-07 05:13:42 +0300
commit29119529d8de5179db44fe59f0155b6534ade914 (patch)
tree423f87e1f6ac00182fa83c2fd9291b4f09b9fb2a /drivers/block/drbd
parentc2b58149d21f619e34ed047ac27eaf280db692da (diff)
parent9fea4b395260175de4016b42982f45a3e6e03d0b (diff)
downloadlinux-29119529d8de5179db44fe59f0155b6534ade914.tar.xz
Merge tag 'for-linus-20180706' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Two minor fixes for this series: - add LOOP_SET_BLOCK_SIZE as compat ioctl (Evan Green) - drbd use-after-free fix (Lars Ellenberg)" * tag 'for-linus-20180706' of git://git.kernel.dk/linux-block: loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl drbd: fix access after free
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_worker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index 1476cb3439f4..5e793dd7adfb 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -282,8 +282,8 @@ void drbd_request_endio(struct bio *bio)
what = COMPLETED_OK;
}
- bio_put(req->private_bio);
req->private_bio = ERR_PTR(blk_status_to_errno(bio->bi_status));
+ bio_put(bio);
/* not req_mod(), we need irqsave here! */
spin_lock_irqsave(&device->resource->req_lock, flags);