All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Girish Moodalbail <girish.moodalbail@oracle.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
	Alexander Duyck <alexander.duyck@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Network Development <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: Re: [vlan_device_event] BUG: unable to handle kernel paging request at 6b6b6ccf
Date: Thu, 9 Nov 2017 16:16:01 -0800	[thread overview]
Message-ID: <CAM_iQpUBDHkrC4kirFdM6ff==9dot5+q+8L_fx2vfRLq+2+Zqw@mail.gmail.com> (raw)
In-Reply-To: <008a7e8d-86e2-0709-d2ae-8aa743ef12ac@oracle.com>

On Thu, Nov 9, 2017 at 7:51 AM, Girish Moodalbail
<girish.moodalbail@oracle.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!

WARNING: multiple messages have this Message-ID (diff)
From: Cong Wang <xiyou.wangcong@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [vlan_device_event] BUG: unable to handle kernel paging request at 6b6b6ccf
Date: Thu, 9 Nov 2017 16:16:01 -0800	[thread overview]
Message-ID: <CAM_iQpUBDHkrC4kirFdM6ff==9dot5+q+8L_fx2vfRLq+2+Zqw@mail.gmail.com> (raw)
In-Reply-To: <008a7e8d-86e2-0709-d2ae-8aa743ef12ac@oracle.com>

On Thu, Nov 9, 2017 at 7:51 AM, Girish Moodalbail
<girish.moodalbail@oracle.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!

  reply	other threads:[~2017-11-10  0:16 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 10:21 [vlan_device_event] BUG: unable to handle kernel paging request at 6b6b6ccf Fengguang Wu
2017-11-07 16:25 ` Linus Torvalds
2017-11-07 16:46   ` Fengguang Wu
2017-11-08  9:48   ` Fengguang Wu
2017-11-08 16:20     ` Linus Torvalds
2017-11-08 16:20       ` [Intel-wired-lan] " Linus Torvalds
2017-11-08 17:12       ` Fengguang Wu
2017-11-08 17:12         ` [Intel-wired-lan] " Fengguang Wu
2017-11-08 17:18         ` Fengguang Wu
2017-11-08 17:18           ` [Intel-wired-lan] " Fengguang Wu
2017-11-08 18:05         ` Linus Torvalds
2017-11-08 18:05           ` [Intel-wired-lan] " Linus Torvalds
2017-11-08 18:36         ` Alexander Duyck
2017-11-08 18:36           ` [Intel-wired-lan] " Alexander Duyck
2017-11-09  3:12           ` Fengguang Wu
2017-11-09  3:12             ` [Intel-wired-lan] " Fengguang Wu
2017-11-09  4:09             ` Fengguang Wu
2017-11-09  4:09               ` [Intel-wired-lan] " Fengguang Wu
2017-11-09  7:22               ` Fengguang Wu
2017-11-09  7:22                 ` [Intel-wired-lan] " Fengguang Wu
2017-11-09  6:34             ` Cong Wang
2017-11-09  6:34               ` [Intel-wired-lan] " Cong Wang
2017-11-09  6:55               ` Fengguang Wu
2017-11-09  6:55                 ` [Intel-wired-lan] " Fengguang Wu
2017-11-09  7:43                 ` Fengguang Wu
2017-11-09  7:43                   ` [Intel-wired-lan] " Fengguang Wu
2017-11-09 15:51               ` Girish Moodalbail
2017-11-09 15:51                 ` [Intel-wired-lan] " Girish Moodalbail
2017-11-10  0:16                 ` Cong Wang [this message]
2017-11-10  0:16                   ` Cong Wang
2017-11-12 19:31         ` Linus Torvalds
2017-11-12 19:31           ` [Intel-wired-lan] " Linus Torvalds
2017-11-13  1:13           ` CONFIG_DEBUG_INFO_SPLIT impacts on faddr2line Fengguang Wu
2017-11-13  1:13             ` [Intel-wired-lan] " Fengguang Wu
2017-11-13  2:05             ` Zhang Rui
2017-11-13  2:05               ` [Intel-wired-lan] " Zhang Rui
2017-11-13  2:22               ` Fengguang Wu
2017-11-13  2:22                 ` [Intel-wired-lan] " Fengguang Wu
2017-11-13 18:52             ` Andi Kleen
2017-11-13 18:52               ` [Intel-wired-lan] " Andi Kleen
2017-11-13 19:14               ` Linus Torvalds
2017-11-13 19:14                 ` [Intel-wired-lan] " Linus Torvalds
2017-11-13 20:10                 ` Andi Kleen
2017-11-13 20:10                   ` [Intel-wired-lan] " Andi Kleen
2017-11-13 20:14                   ` H.J. Lu
2017-11-13 20:14                     ` [Intel-wired-lan] " H.J. Lu
2017-11-13 20:56                   ` Linus Torvalds
2017-11-13 20:56                     ` [Intel-wired-lan] " Linus Torvalds
2017-11-13 21:41                     ` Andi Kleen
2017-11-13 21:41                       ` [Intel-wired-lan] " Andi Kleen
2017-11-13 21:57                       ` Linus Torvalds
2017-11-13 21:57                         ` [Intel-wired-lan] " Linus Torvalds
2017-11-13 23:51                         ` Andi Kleen
2017-11-13 23:51                           ` [Intel-wired-lan] " Andi Kleen
2017-11-14  8:13               ` Fengguang Wu
2017-11-14  8:13                 ` [Intel-wired-lan] " Fengguang Wu
2017-11-09  2:43     ` [vlan_device_event] BUG: unable to handle kernel paging request at 6b6b6ccf Fengguang Wu
2017-11-09  6:48       ` Fengguang Wu

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='CAM_iQpUBDHkrC4kirFdM6ff==9dot5+q+8L_fx2vfRLq+2+Zqw@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fengguang.wu@intel.com \
    --cc=girish.moodalbail@oracle.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 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.