[Drbd-dev] [PATCH v2] drbd: only clone bio if we have a backing device
Jens Axboe
axboe at kernel.dk
Thu Oct 20 14:47:29 CEST 2022
On Thu, 20 Oct 2022 10:52:05 +0200, Christoph Böhmwalder wrote:
> Commit c347a787e34cb (drbd: set ->bi_bdev in drbd_req_new) moved a
> bio_set_dev call (which has since been removed) to "earlier", from
> drbd_request_prepare to drbd_req_new.
>
> The problem is that this accesses device->ldev->backing_bdev, which is
> not NULL-checked at this point. When we don't have an ldev (i.e. when
> the DRBD device is diskless), this leads to a null pointer deref.
>
> [...]
Applied, thanks!
[1/1] drbd: only clone bio if we have a backing device
commit: 6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5
Best regards,
--
Jens Axboe
More information about the drbd-dev
mailing list