Re: [PATCH 3/4] bsg: add SCSI transport-level request support

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

 



fujita.tomonori@xxxxxxxxxxxxx wrote on Sat, 09 Jun 2007 00:12 +0900:
> SCSI transport-level requests such as SAS management protocol (SMP)
> skip blk_verify_command().
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
> ---
>  block/bsg.c         |   27 +++++++++++++++++++++------
>  include/linux/bsg.h |    6 ++++++
>  2 files changed, 27 insertions(+), 6 deletions(-)
> 
> diff --git a/block/bsg.c b/block/bsg.c
> index 13ecc95..f2a9979 100644
> --- a/block/bsg.c
> +++ b/block/bsg.c
> @@ -208,7 +208,11 @@ static int blk_fill_sgv4_hdr_rq(request_
>  	if (copy_from_user(rq->cmd, (void *)(unsigned long)hdr->request,
>  			   hdr->request_len))
>  		return -EFAULT;
> -	if (blk_verify_command(rq->cmd, has_write_perm))
> +
> +	if (hdr->subprotocol == BSG_SUB_PROTOCOL_SCSI_CMD) {
> +		if (blk_verify_command(rq->cmd, has_write_perm))
> +			return -EPERM;
> +	} else if (capable(CAP_SYS_RAWIO))
>  		return -EPERM;

Do you mean !capable here?

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