From: "Lin Ma" <linma@zju.edu.cn>
To: "Simon Horman" <horms@kernel.org>
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 09:44:15 +0800 (GMT+08:00) [thread overview]
Message-ID: <44456b54.180f2.18fa31eca2b.Coremail.linma@zju.edu.cn> (raw)
In-Reply-To: <20240522170302.GA883722@kernel.org>
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.
Regards
Lin
next prev parent reply other threads:[~2024-05-23 1:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 3:15 Lin Ma
2024-05-22 8:12 ` Jiri Pirko
2024-05-22 17:03 ` Simon Horman
2024-05-23 1:44 ` Lin Ma [this message]
2024-05-23 12:55 ` Simon Horman
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=44456b54.180f2.18fa31eca2b.Coremail.linma@zju.edu.cn \
--to=linma@zju.edu.cn \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--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
all inboxes | Powered by JetHome®