From: David Ahern <dsahern@gmail.com>
To: "wangxiaogang (F)" <wangxiaogang3@huawei.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: Fri, 15 Nov 2019 09:59:47 -0700 [thread overview]
Message-ID: <7fe948a8-debd-e336-9584-e66153e90701@gmail.com> (raw)
In-Reply-To: <60e827cb-2bba-2b7e-55dc-651103e9905f@huawei.com>
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.
next prev parent reply other threads:[~2019-11-15 16:59 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 [this message]
2019-11-18 3:16 ` wangxiaogang (F)
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=7fe948a8-debd-e336-9584-e66153e90701@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=hujunwei4@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shrijeet@gmail.com \
--cc=wangxiaogang3@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.