target-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case.
@ 2020-09-16 23:54 Sudhakar Panneerselvam
  2020-09-22 17:28 ` Mike Christie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sudhakar Panneerselvam @ 2020-09-16 23:54 UTC (permalink / raw)
  To: martin.petersen, michael.christie, target-devel, linux-scsi; +Cc: ssudhakarp

transport_lookup_tmr_lun() uses "orig_fe_lun" member of struct se_cmd
for the lookup. Hence, update this field directly for the
TARGET_SCF_LOOKUP_LUN_FROM_TAG case.

Fixes: a36840d80027 ("target: Initialize LUN in transport_init_se_cmd()")
Reported-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
---
 drivers/target/target_core_transport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 9fb0be0aa620..8dd289214dd8 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1840,7 +1840,8 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
 	 * out unpacked_lun for the original se_cmd.
 	 */
 	if (tm_type = TMR_ABORT_TASK && (flags & TARGET_SCF_LOOKUP_LUN_FROM_TAG)) {
-		if (!target_lookup_lun_from_tag(se_sess, tag, &unpacked_lun))
+		if (!target_lookup_lun_from_tag(se_sess, tag,
+						&se_cmd->orig_fe_lun))
 			goto failure;
 	}
 
-- 
1.8.3.1

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

* Re: [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case.
  2020-09-16 23:54 [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case Sudhakar Panneerselvam
@ 2020-09-22 17:28 ` Mike Christie
  2020-09-23  0:51 ` Martin K. Petersen
  2020-09-30  3:33 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Christie @ 2020-09-22 17:28 UTC (permalink / raw)
  To: Sudhakar Panneerselvam, martin.petersen, target-devel, linux-scsi
  Cc: ssudhakarp

On 9/16/20 6:54 PM, Sudhakar Panneerselvam wrote:
> transport_lookup_tmr_lun() uses "orig_fe_lun" member of struct se_cmd
> for the lookup. Hence, update this field directly for the
> TARGET_SCF_LOOKUP_LUN_FROM_TAG case.
> 
> Fixes: a36840d80027 ("target: Initialize LUN in transport_init_se_cmd()")
> Reported-by: Martin Wilck <mwilck@suse.com>
> Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
> ---
>  drivers/target/target_core_transport.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index 9fb0be0aa620..8dd289214dd8 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -1840,7 +1840,8 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
>  	 * out unpacked_lun for the original se_cmd.
>  	 */
>  	if (tm_type = TMR_ABORT_TASK && (flags & TARGET_SCF_LOOKUP_LUN_FROM_TAG)) {
> -		if (!target_lookup_lun_from_tag(se_sess, tag, &unpacked_lun))
> +		if (!target_lookup_lun_from_tag(se_sess, tag,
> +						&se_cmd->orig_fe_lun))
>  			goto failure;
>  	}
>  
> 

Reviewed-by: Mike Christie <michael.christie@oracle.com>

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

* Re: [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case.
  2020-09-16 23:54 [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case Sudhakar Panneerselvam
  2020-09-22 17:28 ` Mike Christie
@ 2020-09-23  0:51 ` Martin K. Petersen
  2020-09-30  3:33 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2020-09-23  0:51 UTC (permalink / raw)
  To: target-devel, Sudhakar Panneerselvam, linux-scsi, michael.christie
  Cc: Martin K . Petersen, ssudhakarp

On Wed, 16 Sep 2020 23:54:31 +0000, Sudhakar Panneerselvam wrote:

> transport_lookup_tmr_lun() uses "orig_fe_lun" member of struct se_cmd
> for the lookup. Hence, update this field directly for the
> TARGET_SCF_LOOKUP_LUN_FROM_TAG case.

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case
      https://git.kernel.org/mkp/scsi/c/149415586243

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case.
  2020-09-16 23:54 [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case Sudhakar Panneerselvam
  2020-09-22 17:28 ` Mike Christie
  2020-09-23  0:51 ` Martin K. Petersen
@ 2020-09-30  3:33 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2020-09-30  3:33 UTC (permalink / raw)
  To: linux-scsi, target-devel, Sudhakar Panneerselvam, michael.christie
  Cc: Martin K . Petersen, ssudhakarp

On Wed, 16 Sep 2020 23:54:31 +0000, Sudhakar Panneerselvam wrote:

> transport_lookup_tmr_lun() uses "orig_fe_lun" member of struct se_cmd
> for the lookup. Hence, update this field directly for the
> TARGET_SCF_LOOKUP_LUN_FROM_TAG case.

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case
      https://git.kernel.org/mkp/scsi/c/149415586243

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-09-30  3:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 23:54 [PATCH] scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case Sudhakar Panneerselvam
2020-09-22 17:28 ` Mike Christie
2020-09-23  0:51 ` Martin K. Petersen
2020-09-30  3:33 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).