* [PATCH v3] target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails
@ 2018-11-06 0:44 Bart Van Assche
2018-11-06 3:18 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2018-11-06 0:44 UTC (permalink / raw)
To: target-devel
Fixes: aa73237dcb2d ("scsi: target/core: Always call transport_complete_callback() upon failure")
Reviewed-by: David Disseldorp <ddiss@suse.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
Changes:
- v2 -> v3: modified patch title
- v1 -> v2: changed approach of this patch as requested by David Disseldorp.
drivers/target/target_core_transport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index e31e4fc31aa1..2cfd61d62e97 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1778,7 +1778,7 @@ EXPORT_SYMBOL(target_submit_tmr);
void transport_generic_request_failure(struct se_cmd *cmd,
sense_reason_t sense_reason)
{
- int ret = 0;
+ int ret = 0, post_ret;
pr_debug("-----[ Storage Engine Exception; sense_reason %d\n",
sense_reason);
@@ -1790,7 +1790,7 @@ void transport_generic_request_failure(struct se_cmd *cmd,
transport_complete_task_attr(cmd);
if (cmd->transport_complete_callback)
- cmd->transport_complete_callback(cmd, false, NULL);
+ cmd->transport_complete_callback(cmd, false, &post_ret);
if (transport_check_aborted_status(cmd, 1))
return;
--
2.19.1.930.g4563a0d9d0-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails
2018-11-06 0:44 [PATCH v3] target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails Bart Van Assche
@ 2018-11-06 3:18 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2018-11-06 3:18 UTC (permalink / raw)
To: target-devel
Bart,
> Fixes: aa73237dcb2d ("scsi: target/core: Always call transport_complete_callback() upon failure")
Applied to 4.20/scsi-fixes. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-06 3:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 0:44 [PATCH v3] target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails Bart Van Assche
2018-11-06 3:18 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.