forked from Minki/linux
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: Philip J Kelleher <pjk1939@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
66bc600363
commit
3eb8dcafb5
@ -174,6 +174,9 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio)
|
|||||||
if (!card)
|
if (!card)
|
||||||
goto req_err;
|
goto req_err;
|
||||||
|
|
||||||
|
if (bio->bi_sector + (bio->bi_size >> 9) > get_capacity(card->gendisk))
|
||||||
|
goto req_err;
|
||||||
|
|
||||||
if (unlikely(card->halt)) {
|
if (unlikely(card->halt)) {
|
||||||
st = -EFAULT;
|
st = -EFAULT;
|
||||||
goto req_err;
|
goto req_err;
|
||||||
|
Loading…
Reference in New Issue
Block a user