From: Gerd Bayer <gbayer@linux.ibm.com>
To: "D. Wythe" <alibuda@linux.alibaba.com>,
Li RongQing <lirongqing@baidu.com>,
wenjia@linux.ibm.com, jaka@linux.ibm.com,
tonylu@linux.alibaba.com, guwen@linux.alibaba.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, ubraun@linux.ibm.com, kgraul@linux.ibm.com,
linux-s390@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net/smc: fix wrong comparation in smc_pnet_add_pnetid
Date: Mon, 14 Oct 2024 08:43:37 +0200 [thread overview]
Message-ID: <0ed7e21875ae766e751cafe9635f3fe49d4c933d.camel@linux.ibm.com> (raw)
In-Reply-To: <39dfed0f-f7c8-47b8-8022-c4c2dc9a73dd@linux.alibaba.com>
Hi Li RongQing,
On Mon, 2024-10-14 at 13:41 +0800, D. Wythe wrote:
> On 10/11/24 2:19 PM, Li RongQing wrote:
> > pnetid of pi (not newly allocated pe) should be compared
> >
> > Fixes: e888a2e8337c ("net/smc: introduce list of pnetids for
> > Ethernet devices")
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> > ---
> > net/smc/smc_pnet.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
> > index 1dd3623..a04aa0e 100644
> > --- a/net/smc/smc_pnet.c
> > +++ b/net/smc/smc_pnet.c
> > @@ -753,7 +753,7 @@ static int smc_pnet_add_pnetid(struct net *net,
> > u8 *pnetid)
> >
> > write_lock(&sn->pnetids_ndev.lock);
> > list_for_each_entry(pi, &sn->pnetids_ndev.list, list) {
> > - if (smc_pnet_match(pnetid, pe->pnetid)) {
> > + if (smc_pnet_match(pnetid, pi->pnetid)) {
> > refcount_inc(&pi->refcnt);
> > kfree(pe);
> > goto unlock;
>
> Reviewed-by: D. Wythe <alibuda@linux.alibaba.com>
>
> Thanks,
> D. Wythe
>
Good catch, indeed!
Is this intentionally discussed off-list?
For consideration by netdev maintainers this will have to be re-
submitted with a [PATCH net] prefix to the netdev mailing list.
Also, I'd prefer, if you could find a more descriptive subject. How
about: "Fix search in list of known pnetids"? However, if you want to
keep the subject please replace "comparation" with "comparison"
Thank you,
Gerd Bayer
next prev parent reply other threads:[~2024-10-14 6:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241011061916.26310-1-lirongqing@baidu.com>
2024-10-12 7:49 ` [PATCH] net/smc: fix wrong comparation in smc_pnet_add_pnetid Wen Gu
2024-10-14 5:41 ` D. Wythe
2024-10-14 6:43 ` Gerd Bayer [this message]
2024-10-14 7:16 ` Gerd Bayer
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=0ed7e21875ae766e751cafe9635f3fe49d4c933d.camel@linux.ibm.com \
--to=gbayer@linux.ibm.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tonylu@linux.alibaba.com \
--cc=ubraun@linux.ibm.com \
--cc=wenjia@linux.ibm.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