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); } }