public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Bart Van Assche <bart.vanassche@gmail•com>,
	"Nicholas A. Bellinger" <nab@linux-iscsi•org>
Cc: Linux-Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>
Subject: linux-next: manual merge of the target-bva tree with the target-updates tree
Date: Thu, 1 Jun 2017 14:10:55 +1000	[thread overview]
Message-ID: <20170601141055.3b64fefc@canb.auug.org.au> (raw)

Hi Bart,

Today's linux-next merge of the target-bva tree got a conflict in:

  drivers/target/target_core_transport.c

between commit:

  4ff83daa0200 ("target: Re-add check to reject control WRITEs with overflow data")

from the target-updates tree and commit:

  2c66660df665 ("target: Fix overflow/underflow handling of commands with a Data-Out buffer")

from the target-bva tree.

I fixed it up (I think (guidance appreciated), see below) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/target/target_core_transport.c
index 6025935036c9,6cd49fe578a7..000000000000
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@@ -1164,37 -1164,7 +1164,21 @@@ target_cmd_size_check(struct se_cmd *cm
  			" %u does not match SCSI CDB Length: %u for SAM Opcode:"
  			" 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) {
- 			if (cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) {
- 				pr_err_ratelimited("Rejecting underflow/overflow"
- 						   " for WRITE data CDB\n");
- 				return TCM_INVALID_CDB_FIELD;
- 			}
 +			/*
 +			 * Some fabric drivers like iscsi-target still expect to
 +			 * always reject overflow writes.  Reject this case until
 +			 * full fabric driver level support for overflow writes
 +			 * is introduced tree-wide.
 +			 */
 +			if (size > cmd->data_length) {
 +				pr_err_ratelimited("Rejecting overflow for"
 +						   " WRITE control CDB\n");
 +				return TCM_INVALID_CDB_FIELD;
 +			}
 +		}
  		/*
- 		 * Reject READ_* or WRITE_* with overflow/underflow for
- 		 * type SCF_SCSI_DATA_CDB.
- 		 */
- 		if (dev->dev_attrib.block_size != 512)  {
- 			pr_err("Failing OVERFLOW/UNDERFLOW for LBA op"
- 				" CDB on non 512-byte sector setup subsystem"
- 				" plugin: %s\n", dev->transport->name);
- 			/* Returns CHECK_CONDITION + INVALID_CDB_FIELD */
- 			return TCM_INVALID_CDB_FIELD;
- 		}
- 		/*
  		 * For the overflow case keep the existing fabric provided
  		 * ->data_length.  Otherwise for the underflow case, reset
  		 * ->data_length to the smaller SCSI expected data transfer

             reply	other threads:[~2017-06-01  4:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01  4:10 Stephen Rothwell [this message]
2017-06-01  4:27 ` linux-next: manual merge of the target-bva tree with the target-updates tree Nicholas A. Bellinger
2017-06-01  5:05   ` Bart Van Assche
2017-06-01  5:15     ` Nicholas A. Bellinger
2017-06-01  4:59 ` Bart Van Assche
2017-06-01  5:04   ` Nicholas A. Bellinger
2017-06-01 21:14     ` Bart Van Assche
2017-06-01 23:28       ` Stephen Rothwell
2017-06-02  3:58       ` Nicholas A. Bellinger
  -- strict thread matches above, loose matches on Subject: below --
2017-06-02  4:05 Stephen Rothwell
2017-06-02  4:11 ` Stephen Rothwell
2017-02-20  2:51 Stephen Rothwell

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=20170601141055.3b64fefc@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=bart.vanassche@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=nab@linux-iscsi$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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