From: "wangxiaogang (F)" <wangxiaogang3@huawei.com>
To: David Ahern <dsahern@gmail.com>, <dsahern@kernel.org>,
<shrijeet@gmail.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<hujunwei4@huawei.com>, <xuhanbing@huawei.com>
Subject: Re: [PATCH] vrf: Fix possible NULL pointer oops when delete nic
Date: Mon, 18 Nov 2019 11:16:31 +0800 [thread overview]
Message-ID: <bead86fd-ae33-219f-0601-d80b57695d3c@huawei.com> (raw)
In-Reply-To: <7fe948a8-debd-e336-9584-e66153e90701@gmail.com>
On 2019/11/16 0:59, David Ahern wrote:
> On 11/14/19 11:22 PM, wangxiaogang (F) wrote:
>> diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
>> index b8228f5..86c4b8c 100644
>> --- a/drivers/net/vrf.c
>> +++ b/drivers/net/vrf.c
>> @@ -1427,6 +1427,9 @@ static int vrf_device_event(struct notifier_block *unused,
>> goto out;
>>
>> vrf_dev = netdev_master_upper_dev_get(dev);
>> + if (!vrf_dev)
>> + goto out;
>> +
>> vrf_del_slave(vrf_dev, dev);
>> }
>> out:
>
> BTW, I believe this is the wrong fix. A device can not be a VRF slave
> AND not have an upper device. Something is fundamentally wrong.
>
>
this problem occurs when our testers deleted the NIC and vrf in parallel.
I will try to recurring this problem later.
next prev parent reply other threads:[~2019-11-18 3:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 6:22 [PATCH] vrf: Fix possible NULL pointer oops when delete nic wangxiaogang (F)
2019-11-15 13:14 ` David Ahern
2019-11-18 3:15 ` wangxiaogang (F)
2019-11-18 3:22 ` David Ahern
2019-11-15 16:59 ` David Ahern
2019-11-18 3:16 ` wangxiaogang (F) [this message]
2019-11-18 3:21 ` David Ahern
2019-11-16 20:53 ` David Miller
2019-11-17 6:17 ` Taehee Yoo
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=bead86fd-ae33-219f-0601-d80b57695d3c@huawei.com \
--to=wangxiaogang3@huawei.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=hujunwei4@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shrijeet@gmail.com \
--cc=xuhanbing@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).