mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the scsi-mkp tree with the rdma tree
@ 2026-11-19 17:13 Mark Brown
  2026-11-22  8:39 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-11-19 17:13 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Jason Gunthorpe, Leon Romanovsky, Leon Romanovsky,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Martin K. Petersen, Shao Mingyin, Yong Liu

[-- Attachment #1: Type: text/plain, Size: 1863 bytes --]

Hi all,

Today's linux-next merge of the scsi-mkp tree got a conflict in:

  drivers/target/target_core_transport.c

between commit:

  1ecb732b4524d ("scsi: target: Clear all control read scatterlist entries")

from the rdma tree and commit:

  0fc91e8028018 ("scsi: target: core: Drop the dead kmap_local_page() NULL check")

from the scsi-mkp tree.

I fixed it up (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.

diff --combined drivers/target/target_core_transport.c
index 267f5e2cc8b24,9819515ce9674..0000000000000
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@@ -1633,16 -1633,21 +1633,16 @@@ static int __target_submit(struct se_cm
  	core_alua_check_nonop_delay(cmd);
  
  	if (cmd->t_data_nents != 0) {
 -		/*
 -		 * This is primarily a hack for udev and tcm loop which sends
 -		 * INQUIRYs with a single page and expects the data to be
 -		 * cleared.
 -		 */
 +		/* Control CDB handlers may leave response bytes untouched. */
  		if (!(cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) &&
  		    cmd->data_direction == DMA_FROM_DEVICE) {
 -			struct scatterlist *sgl = cmd->t_data_sg;
 -			unsigned char *buf = NULL;
 +			struct scatterlist *sg;
 +			unsigned int i;
  
 -			BUG_ON(!sgl);
 +			BUG_ON(!cmd->t_data_sg);
  
 -			buf = kmap_local_page(sg_page(sgl));
 -			memset(buf + sgl->offset, 0, sgl->length);
 -			kunmap_local(buf);
 +			for_each_sg(cmd->t_data_sg, sg, cmd->t_data_nents, i)
 +				sg_zero_buffer(sg, 1, sg->length, 0);
  		}
  	}
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the scsi-mkp tree with the rdma tree
  2026-11-19 17:13 linux-next: manual merge of the scsi-mkp tree with the rdma tree Mark Brown
@ 2026-11-22  8:39 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2026-11-22  8:39 UTC (permalink / raw)
  To: Mark Brown, Martin K. Petersen
  Cc: Jason Gunthorpe, Linux Kernel Mailing List,
	Linux Next Mailing List, Martin K. Petersen, Shao Mingyin,
	Yong Liu

On Thu, Nov 19, 2026 at 05:13:40PM +0000, Mark Brown wrote:
> Hi all,
> 
> Today's linux-next merge of the scsi-mkp tree got a conflict in:
> 
>   drivers/target/target_core_transport.c
> 
> between commit:
> 
>   1ecb732b4524d ("scsi: target: Clear all control read scatterlist entries")

Martin,

That patch is part of this series:
https://lore.kernel.org/all/20261113083848.1517595-1-pkfxxxing@gmail.com/#t

We can drop it from the RDMA tree and have it go through your tree instead.

Thanks

> 
> from the rdma tree and commit:
> 
>   0fc91e8028018 ("scsi: target: core: Drop the dead kmap_local_page() NULL check")
> 
> from the scsi-mkp tree.
> 
> I fixed it up (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.
> 
> diff --combined drivers/target/target_core_transport.c
> index 267f5e2cc8b24,9819515ce9674..0000000000000
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@@ -1633,16 -1633,21 +1633,16 @@@ static int __target_submit(struct se_cm
>   	core_alua_check_nonop_delay(cmd);
>   
>   	if (cmd->t_data_nents != 0) {
>  -		/*
>  -		 * This is primarily a hack for udev and tcm loop which sends
>  -		 * INQUIRYs with a single page and expects the data to be
>  -		 * cleared.
>  -		 */
>  +		/* Control CDB handlers may leave response bytes untouched. */
>   		if (!(cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) &&
>   		    cmd->data_direction == DMA_FROM_DEVICE) {
>  -			struct scatterlist *sgl = cmd->t_data_sg;
>  -			unsigned char *buf = NULL;
>  +			struct scatterlist *sg;
>  +			unsigned int i;
>   
>  -			BUG_ON(!sgl);
>  +			BUG_ON(!cmd->t_data_sg);
>   
>  -			buf = kmap_local_page(sg_page(sgl));
>  -			memset(buf + sgl->offset, 0, sgl->length);
>  -			kunmap_local(buf);
>  +			for_each_sg(cmd->t_data_sg, sg, cmd->t_data_nents, i)
>  +				sg_zero_buffer(sg, 1, sg->length, 0);
>   		}
>   	}
>   



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-22  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 17:13 linux-next: manual merge of the scsi-mkp tree with the rdma tree Mark Brown
2026-11-22  8:39 ` Leon Romanovsky

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®