* [PATCH] bsg: Remove bogus check against request_queue->max_sectors
@ 2009-01-20 13:08 Boaz Harrosh
2009-01-20 13:09 ` Jens Axboe
2009-01-20 23:10 ` FUJITA Tomonori
0 siblings, 2 replies; 3+ messages in thread
From: Boaz Harrosh @ 2009-01-20 13:08 UTC (permalink / raw)
To: FUJITA Tomonori, Jens Axboe; +Cc: linux-scsi, open-osd mailing-list
bsg submits REQ_TYPE_BLOCK_PC so the right check is max_hw_sectors.
But I've removed this check because right after, bsg proceeds with
calling blk_rq_map_user() which does all the right checks.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
block/bsg.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/block/bsg.c b/block/bsg.c
index 0ce8806..44a2a0f 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -218,9 +218,6 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)
if (hdr->guard != 'Q')
return -EINVAL;
- if (hdr->dout_xfer_len > (q->max_sectors << 9) ||
- hdr->din_xfer_len > (q->max_sectors << 9))
- return -EIO;
switch (hdr->protocol) {
case BSG_PROTOCOL_SCSI:
--
1.6.0.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] bsg: Remove bogus check against request_queue->max_sectors
2009-01-20 13:08 [PATCH] bsg: Remove bogus check against request_queue->max_sectors Boaz Harrosh
@ 2009-01-20 13:09 ` Jens Axboe
2009-01-20 23:10 ` FUJITA Tomonori
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2009-01-20 13:09 UTC (permalink / raw)
To: Boaz Harrosh; +Cc: FUJITA Tomonori, linux-scsi, open-osd mailing-list
On Tue, Jan 20 2009, Boaz Harrosh wrote:
>
> bsg submits REQ_TYPE_BLOCK_PC so the right check is max_hw_sectors.
> But I've removed this check because right after, bsg proceeds with
> calling blk_rq_map_user() which does all the right checks.
>
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Definitely right.
Acked-by: Jens Axboe <jens.axboe@oracle.com>
> ---
> block/bsg.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/block/bsg.c b/block/bsg.c
> index 0ce8806..44a2a0f 100644
> --- a/block/bsg.c
> +++ b/block/bsg.c
> @@ -218,9 +218,6 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)
>
> if (hdr->guard != 'Q')
> return -EINVAL;
> - if (hdr->dout_xfer_len > (q->max_sectors << 9) ||
> - hdr->din_xfer_len > (q->max_sectors << 9))
> - return -EIO;
>
> switch (hdr->protocol) {
> case BSG_PROTOCOL_SCSI:
> --
> 1.6.0.1
>
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] bsg: Remove bogus check against request_queue->max_sectors
2009-01-20 13:08 [PATCH] bsg: Remove bogus check against request_queue->max_sectors Boaz Harrosh
2009-01-20 13:09 ` Jens Axboe
@ 2009-01-20 23:10 ` FUJITA Tomonori
1 sibling, 0 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2009-01-20 23:10 UTC (permalink / raw)
To: bharrosh; +Cc: fujita.tomonori, jens.axboe, linux-scsi, osd-dev
On Tue, 20 Jan 2009 15:08:22 +0200
Boaz Harrosh <bharrosh@panasas.com> wrote:
>
> bsg submits REQ_TYPE_BLOCK_PC so the right check is max_hw_sectors.
> But I've removed this check because right after, bsg proceeds with
> calling blk_rq_map_user() which does all the right checks.
>
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
> ---
> block/bsg.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/block/bsg.c b/block/bsg.c
> index 0ce8806..44a2a0f 100644
> --- a/block/bsg.c
> +++ b/block/bsg.c
> @@ -218,9 +218,6 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)
>
> if (hdr->guard != 'Q')
> return -EINVAL;
> - if (hdr->dout_xfer_len > (q->max_sectors << 9) ||
> - hdr->din_xfer_len > (q->max_sectors << 9))
> - return -EIO;
>
> switch (hdr->protocol) {
> case BSG_PROTOCOL_SCSI:
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-20 23:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 13:08 [PATCH] bsg: Remove bogus check against request_queue->max_sectors Boaz Harrosh
2009-01-20 13:09 ` Jens Axboe
2009-01-20 23:10 ` FUJITA Tomonori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox