Re: [PATCH] bsg: Remove bogus check against request_queue->max_sectors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

Definitely right.

Acked-by: Jens Axboe <jens.axboe@xxxxxxxxxx>

> ---
>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux