qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Darren Kenny <darren.kenny@oracle.com>
To: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Jason Wang <jasowang@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>,
	Zhang Chen <zhangckid@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] colo-compare: fix the dangerous assignment
Date: Thu, 16 Nov 2017 10:13:48 +0000	[thread overview]
Message-ID: <20171116101348.vmwthadfeu3mzuke@starbug-vm.ie.oracle.com> (raw)
In-Reply-To: <20171116022832.24894-1-maozy.fnst@cn.fujitsu.com>

On Thu, Nov 16, 2017 at 10:28:32AM +0800, Mao Zhongyi wrote:
>Cc: Peter Maydell <peter.maydell@linaro.org>
>Cc: Jason Wang <jasowang@redhat.com>
>Cc: Zhang Chen <zhangckid@gmail.com>
>Cc: Li Zhijian <lizhijian@cn.fujitsu.com>
>Cc: Paolo Bonzini <pbonzini@redhat.com>
>Fixes: 8ec14402029d783720f4312ed8a925548e1dad61
>Reported-by: Peter Maydell <peter.maydell@linaro.org>
>Reported-by: Paolo Bonzini <pbonzini@redhat.com>
>Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>

Code-wise, this looks like a valid fix to the existing code.

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>

But testing wise, have you confirmed that things are behaving as you
expected with the previous patch, since previously when calling
colo_compare_connection(), the value of conn would have always been
its initialized value of NULL.

Just want to be sure that fixing this doesn't end up breaking your
expected behaviour given that all your testing before would have had
a NULL value in conn.

Thanks,

Darren.

>---
> net/colo-compare.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/net/colo-compare.c b/net/colo-compare.c
>index ccdcba2..1ce195f 100644
>--- a/net/colo-compare.c
>+++ b/net/colo-compare.c
>@@ -179,7 +179,7 @@ static int packet_enqueue(CompareState *s, int mode, Connection **con)
>                          "drop packet");
>         }
>     }
>-    con = &conn;
>+    *con = conn;
>
>     return 0;
> }
>-- 
>2.9.4
>
>
>
>

  reply	other threads:[~2017-11-16 10:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16  2:28 [Qemu-devel] [PATCH] colo-compare: fix the dangerous assignment Mao Zhongyi
2017-11-16 10:13 ` Darren Kenny [this message]
2017-11-16 12:25   ` Mao Zhongyi
2017-11-16 20:07 ` Stefan Weil
2017-11-17  1:21   ` Mao Zhongyi
2017-11-17  2:34 ` Jason Wang

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=20171116101348.vmwthadfeu3mzuke@starbug-vm.ie.oracle.com \
    --to=darren.kenny@oracle.com \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=maozy.fnst@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhangckid@gmail.com \
    /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 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).