[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUBDHkrC4kirFdM6ff==9dot5+q+8L_fx2vfRLq+2+Zqw@mail.gmail.com>
Date: Thu, 9 Nov 2017 16:16:01 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Girish Moodalbail <girish.moodalbail@...cle.com>
Cc: Fengguang Wu <fengguang.wu@...el.com>,
Alexander Duyck <alexander.duyck@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Network Development <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
intel-wired-lan <intel-wired-lan@...ts.osuosl.org>
Subject: Re: [vlan_device_event] BUG: unable to handle kernel paging request
at 6b6b6ccf
On Thu, Nov 9, 2017 at 7:51 AM, Girish Moodalbail
<girish.moodalbail@...cle.com> wrote:
>
> Upon receiving NETDEV_DOWN event, we are calling
>
> vlan_vid_del(dev, htons(ETH_P_8021Q), 0);
>
> which in turn calls call_rcu() to queue vlan_info_free_rcu() to be called at
> some point. This free function frees the array[]
> (vlan_info.vlan_grp.vn_devices_array). My guess is that
> vlan_info_free_rcu() is being called first and then the array[] is being
> accessed in vlan_device_event().
>
Well yes and no.
No, RCU itself is not broken and we clearly unpublish the RCU pointer
before calling call_rcu().
Yes, I see where it is broken: the grp pointer still points to old
dev->vlan_info, we should re-fetch it after vlan_vid_del().
I will send a fix.
Thanks!
Powered by blists - more mailing lists