mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Spencer Baugh <sbaugh@catern.com>
Cc: "open list:TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
	"open list:TARGET SUBSYSTEM" <target-devel@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Joern Engel <joern@purestorage.com>,
	Spencer Baugh <Spencer.baugh@purestorage.com>,
	Roland Dreier <roland@purestorage.com>
Subject: Re: [PATCH] target: allow underflow/overflow for PR OUT etc. commands
Date: Thu, 30 Jul 2015 23:44:23 -0700	[thread overview]
Message-ID: <1438325063.16598.15.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <1437602898-15229-4-git-send-email-sbaugh@catern.com>

On Wed, 2015-07-22 at 15:08 -0700, Spencer Baugh wrote:
> From: Roland Dreier <roland@purestorage.com>
> 
> It's not necessarily a fatal error if a command with a data-out phase
> has a data length that differs from the transport data length (e.g.
> PERSISTENT RESERVE OUT might have a parameter list length in the CDB
> that's smaller than the FC_DL field), so allow these commands.  The
> Windows compliance test sends them.
> 
> Signed-off-by: Roland Dreier <roland@purestorage.com>
> Signed-off-by: Spencer Baugh <sbaugh@catern.com>
> ---
>  drivers/target/target_core_transport.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index ac002a7..f6626bb 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -1087,9 +1087,9 @@ target_cmd_size_check(struct se_cmd *cmd, unsigned int size)
>  			" 0x%02x\n", cmd->se_tfo->get_fabric_name(),
>  				cmd->data_length, size, cmd->t_task_cdb[0]);
>  
> -		if (cmd->data_direction == DMA_TO_DEVICE) {
> -			pr_err("Rejecting underflow/overflow"
> -					" WRITE data\n");
> +		if (cmd->data_direction == DMA_TO_DEVICE &&
> +		    cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) {
> +			pr_err("Rejecting underflow/overflow WRITE data\n");
>  			return TCM_INVALID_CDB_FIELD;
>  		}
>  		/*

Applied to target-pending/for-next.

Thanks Roland & Co.


      parent reply	other threads:[~2015-07-31  6:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 22:08 Spencer Baugh
2015-07-23  9:44 ` Christoph Hellwig
2015-07-31  6:44 ` Nicholas A. Bellinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438325063.16598.15.camel@haakon3.risingtidesystems.com \
    --to=nab@linux-iscsi.org \
    --cc=Spencer.baugh@purestorage.com \
    --cc=joern@purestorage.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roland@purestorage.com \
    --cc=sbaugh@catern.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®