summaryrefslogtreecommitdiffstats
path: root/drivers/block/rsxx/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/rsxx/dev.c')
-rw-r--r--drivers/block/rsxx/dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c
index a092f58..d7af441 100644
--- a/drivers/block/rsxx/dev.c
+++ b/drivers/block/rsxx/dev.c
@@ -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;
OpenPOWER on IntegriCloud