All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH] target/core: Make it safe to pass NULL as third argument to compare_and_write_callback()
Date: Mon, 05 Nov 2018 19:15:31 +0000	[thread overview]
Message-ID: <1541445331.196084.150.camel@acm.org> (raw)
In-Reply-To: <20181105172317.248955-1-bvanassche@acm.org>

On Mon, 2018-11-05 at 18:55 +-0100, David Disseldorp wrote:
+AD4 Hi Bart,
+AD4 
+AD4 On Mon,  5 Nov 2018 09:23:17 -0800, Bart Van Assche wrote:
+AD4 
+AD4 +AD4 Fixes: aa73237dcb2d (+ACI-scsi: target/core: Always call transport+AF8-complete+AF8-callback() upon failure+ACI)
+AD4 
+AD4 ...
+AD4 +AD4 This patch fixes a bug that was introduced during the merge window. Please consider
+AD4 +AD4 this patch for a v4.20-rc+ADw-n+AD4 kernel.
+AD4 +AD4 
+AD4 +AD4  drivers/target/target+AF8-core+AF8-sbc.c +AHw 3 +-+--
+AD4 +AD4  1 file changed, 2 insertions(+-), 1 deletion(-)
+AD4 +AD4 
+AD4 +AD4 diff --git a/drivers/target/target+AF8-core+AF8-sbc.c b/drivers/target/target+AF8-core+AF8-sbc.c
+AD4 +AD4 index 1ac1f7d2e6c9..7c8433e32906 100644
+AD4 +AD4 --- a/drivers/target/target+AF8-core+AF8-sbc.c
+AD4 +AD4 +-+-+- b/drivers/target/target+AF8-core+AF8-sbc.c
+AD4 +AD4 +AEAAQA -480,7 +-480,8 +AEAAQA static sense+AF8-reason+AF8-t compare+AF8-and+AF8-write+AF8-callback(struct se+AF8-cmd +ACo-cmd, bool succes
+AD4 +AD4  	if (cmd-+AD4-scsi+AF8-status) +AHs
+AD4 +AD4  		pr+AF8-debug(+ACI-compare+AF8-and+AF8-write+AF8-callback: non zero scsi+AF8-status:+ACI
+AD4 +AD4  			+ACI 0x+ACU-02x+AFw-n+ACI, cmd-+AD4-scsi+AF8-status)+ADs
+AD4 +AD4 -		+ACo-post+AF8-ret +AD0 1+ADs
+AD4 +AD4 +-		if (post+AF8-ret)
+AD4 +AD4 +-			+ACo-post+AF8-ret +AD0 1+ADs
+AD4 +AD4  		if (cmd-+AD4-scsi+AF8-status +AD0APQ SAM+AF8-STAT+AF8-CHECK+AF8-CONDITION)
+AD4 +AD4  			ret +AD0 TCM+AF8-LOGICAL+AF8-UNIT+AF8-COMMUNICATION+AF8-FAILURE+ADs
+AD4 +AD4  		goto out+ADs
+AD4 
+AD4 IIUC, this still leaves compare+AF8-and+AF8-write+AF8-post() with a potential NULL
+AD4 post+AF8-ret deref. My preference would be to just go back to having the
+AD4 unused variable provided by the transport+AF8-generic+AF8-request+AF8-failure()
+AD4 caller.

Hi David,

A second version that follows your proposal but that does not reintroduce the
+ACI-unused variable+ACI warning has been posted. Further feedback is welcome.

Bart.

      parent reply	other threads:[~2018-11-05 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 17:23 [PATCH] target/core: Make it safe to pass NULL as third argument to compare_and_write_callback() Bart Van Assche
2018-11-05 17:55 ` David Disseldorp
2018-11-05 19:09 ` David Disseldorp
2018-11-05 19:15 ` Bart Van Assche [this message]

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=1541445331.196084.150.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.