Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-11-01 Thread Cong Wang
On Wed, Nov 1, 2017 at 9:55 AM, Lucas Bates wrote: > On Tue, Oct 31, 2017 at 7:02 PM, Cong Wang wrote: >> On Tue, Oct 31, 2017 at 3:09 PM, Cong Wang wrote: >>> >>> This almost rules out the guilty of this patchset. >>> >>> I will provide a patch for you to test, since I can't reproduce it here.

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-11-01 Thread Lucas Bates
On Tue, Oct 31, 2017 at 7:02 PM, Cong Wang wrote: > On Tue, Oct 31, 2017 at 3:09 PM, Cong Wang wrote: >> >> This almost rules out the guilty of this patchset. >> >> I will provide a patch for you to test, since I can't reproduce it here. >> > > Lucas, please test the attached patch, it applies to

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Cong Wang
On Tue, Oct 31, 2017 at 3:09 PM, Cong Wang wrote: > > This almost rules out the guilty of this patchset. > > I will provide a patch for you to test, since I can't reproduce it here. > Lucas, please test the attached patch, it applies to latest -net. Note, it is a combination of 3 patches which t

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Cong Wang
On Tue, Oct 31, 2017 at 12:13 PM, Lucas Bates wrote: > On Tue, Oct 31, 2017 at 2:55 PM, Lucas Bates wrote: >> Unfortunately it doesn't seem to have had any effect, I'm still seeing >> the same bug as yesterday. At Jamal's suggestion I put in a delay As I replied to you privately, it is probably

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 2:55 PM, Lucas Bates wrote: > On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim wrote: >> On 17-10-31 01:44 AM, Cong Wang wrote: >>> >>> Can you try this patch? From your stack trace it is not clear where >>> the cause is, but we know that the crash is in __tcf_idr_release

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim wrote: > On 17-10-31 01:44 AM, Cong Wang wrote: >> >> Can you try this patch? From your stack trace it is not clear where >> the cause is, but we know that the crash is in __tcf_idr_release(), >> this is how I came up with the following patch: >> >

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Jamal Hadi Salim
On 17-10-31 01:44 AM, Cong Wang wrote: On Mon, Oct 30, 2017 at 6:03 PM, Lucas Bates wrote: On Oct 30, 2017 19:13, "Cong Wang" wrote: Can you try this patch? From your stack trace it is not clear where the cause is, but we know that the crash is in __tcf_idr_release(), this is how I came u

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Cong Wang
On Mon, Oct 30, 2017 at 6:03 PM, Lucas Bates wrote: > On Oct 30, 2017 19:13, "Cong Wang" wrote: >> >> On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: >> > e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang >> > wrote: >> >> Recently, the RCU callbacks used in TC filters and TC actions keep >> >>

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
On Mon, Oct 30, 2017 at 7:12 PM, Cong Wang wrote: > On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: >> e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang >> wrote: >>> Recently, the RCU callbacks used in TC filters and TC actions keep >>> drawing my attention, they introduce at least 4 race condi

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Cong Wang
On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: > e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang wrote: >> Recently, the RCU callbacks used in TC filters and TC actions keep >> drawing my attention, they introduce at least 4 race condition bugs: > >> As suggested by Paul, we could defer the wo

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang wrote: > Recently, the RCU callbacks used in TC filters and TC actions keep > drawing my attention, they introduce at least 4 race condition bugs: > As suggested by Paul, we could defer the work to a workqueue and > gain the permission of holding RTNL

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-29 Thread David Miller
From: Cong Wang Date: Thu, 26 Oct 2017 18:24:27 -0700 > Recently, the RCU callbacks used in TC filters and TC actions keep > drawing my attention, they introduce at least 4 race condition bugs: ... > As suggested by Paul, we could defer the work to a workqueue and > gain the permission of holdin

[Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-26 Thread Cong Wang
Recently, the RCU callbacks used in TC filters and TC actions keep drawing my attention, they introduce at least 4 race condition bugs: 1. A simple one fixed by Daniel: commit c78e1746d3ad7d548bdf3fe491898cc453911a49 Author: Daniel Borkmann Date: Wed May 20 17:13:33 2015 +0200 net: sched: