mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "wanghai (M)" <wanghai38@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <jiri@nvidia.com>, <davem@davemloft.net>, <idosch@mellanox.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()
Date: Fri, 13 Nov 2020 19:59:56 +0800	[thread overview]
Message-ID: <c6c5af9e-431d-97f7-16d3-aa4774041765@huawei.com> (raw)
In-Reply-To: <20201112095124.660733a7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>


在 2020/11/13 1:51, Jakub Kicinski 写道:
> On Wed, 11 Nov 2020 21:58:53 +0800 Wang Hai wrote:
>> If sb_occ_port_pool_get() failed in devlink_nl_sb_port_pool_fill(),
>> msg should be canceled by genlmsg_cancel().
>> +++ b/net/core/devlink.c
>> @@ -1447,8 +1447,10 @@ static int devlink_nl_sb_port_pool_fill(struct sk_buff *msg,
[...]
>>   			return err;
> I guess the driver would have to return -EMSGSIZE for this to matter,
> which is quite unlikely but we should indeed fix.
>
> Still, returning in the middle of the function with an epilogue is what
> got use here in the first place, so please use a goto. E.g. like this:
>
[...]
>   static int devlink_nl_cmd_sb_port_pool_get_doit(struct sk_buff *skb,
>
> .

Thanks for your review,  I just sent v2

[PATCH v2 net] devlink: Add missing genlmsg_cancel() in 
devlink_nl_sb_port_pool_fill()


      reply	other threads:[~2020-11-13 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 13:58 Wang Hai
2020-11-12 17:51 ` Jakub Kicinski
2020-11-13 11:59   ` wanghai (M) [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=c6c5af9e-431d-97f7-16d3-aa4774041765@huawei.com \
    --to=wanghai38@huawei.com \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 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®