From: Simon Horman <horms@kernel.org>
To: Lin Ma <linma@zju.edu.cn>
Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, yuehaibing@huawei.com,
larysa.zaremba@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 net-next] ila: avoid genlmsg_reply when not ila_map found
Date: Thu, 23 May 2024 13:55:49 +0100 [thread overview]
Message-ID: <20240523125549.GM883722@kernel.org> (raw)
In-Reply-To: <44456b54.180f2.18fa31eca2b.Coremail.linma@zju.edu.cn>
On Thu, May 23, 2024 at 09:44:15AM +0800, Lin Ma wrote:
> Hi Simon.
>
> >
> > Hi Lin Ma,
> >
> > The lines immediately above those covered by this patch are as follows:
> >
> > ret = -ESRCH;
> > ila = ila_lookup_by_params(&xp, ilan);
> > if (ila) {
> > ret = ila_dump_info(ila,
> >
> > > @@ -483,6 +483,8 @@ int ila_xlat_nl_cmd_get_mapping(struct sk_buff *skb, struct genl_info *info)
> > > info->snd_portid,
> > > info->snd_seq, 0, msg,
> > > info->genlhdr->cmd);
> > > + } else {
> > > + ret = -EINVAL;
> > > }
> > >
> > > rcu_read_unlock();
> >
> > And the lines following, up to the end of the function, are:
> >
> > if (ret < 0)
> > goto out_free;
> >
> > return genlmsg_reply(msg, info);
> >
> > out_free:
> > nlmsg_free(msg);
> > return ret;
> >
> > By my reading, without your patch, if ila is not found (NULL)
> > then ret will be -ESRCH, and genlmsg_reply will not be called.
> >
> > I feel that I am missing something here.
>
> Oh my bad, it seems this bug was already fixed by the
> commit 693aa2c0d9b6 ("ila: do not generate empty messages
> in ila_xlat_nl_cmd_get_mapping()") last year.
> And my dated kernel does not apply that one.
>
> Thanks for reminding me of this false alarm.
Thanks for checking.
I think we can retire this patch.
prev parent reply other threads:[~2024-05-23 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 3:15 [PATCH v1 net-next] ila: avoid genlmsg_reply when not ila_map found Lin Ma
2024-05-22 8:12 ` Jiri Pirko
2024-05-22 17:03 ` Simon Horman
2024-05-23 1:44 ` Lin Ma
2024-05-23 12:55 ` Simon Horman [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=20240523125549.GM883722@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yuehaibing@huawei.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).