Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eb8dcaf authored by Philip J Kelleher's avatar Philip J Kelleher Committed by Jens Axboe
Browse files

rsxx: Adapter address space sanity check.



Adding a sanity check to guarentee that DMAs outside of the device's
address space will be errored out right away.

Signed-off-by: default avatarPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 66bc6003
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -174,6 +174,9 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio)
	if (!card)
		goto req_err;

	if (bio->bi_sector + (bio->bi_size >> 9) > get_capacity(card->gendisk))
		goto req_err;

	if (unlikely(card->halt)) {
		st = -EFAULT;
		goto req_err;