From: David Miller <davem@davemloft.net>
To: chenweilong@huawei.com
Cc: kuba@kernel.org, jiri@mellanox.com, edumazet@google.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails
Date: Mon, 13 Jul 2020 12:02:06 -0700 (PDT) [thread overview]
Message-ID: <20200713.120206.428449983947812863.davem@davemloft.net> (raw)
In-Reply-To: <20200713075528.141235-1-chenweilong@huawei.com>
From: Weilong Chen <chenweilong@huawei.com>
Date: Mon, 13 Jul 2020 15:55:28 +0800
> When vlan_newlink call register_vlan_dev fails, it might return error
> with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should
> free the memory. But currently rtnl_newlink only free the memory which
> state is NETREG_UNINITIALIZED.
...
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Weilong Chen <chenweilong@huawei.com>
This needs a Fixes: tag.
Also, can't this bug happen in mainline too? It's a bug fix and therefore
should target 'net' instead of 'net-next'.
next prev parent reply other threads:[~2020-07-13 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 7:55 [PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails Weilong Chen
2020-07-13 19:02 ` David Miller [this message]
2020-07-14 6:47 ` Weilong Chen
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=20200713.120206.428449983947812863.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=chenweilong@huawei.com \
--cc=edumazet@google.com \
--cc=jiri@mellanox.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;
as well as URLs for NNTP newsgroup(s).