Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-26 Thread David Miller
From: Daniel Borkmann Date: Wed, 21 Dec 2016 18:04:11 +0100 > Shahar reported a soft lockup in tc_classify(), where we run into an > endless loop when walking the classifier chain due to tp->next == tp > which is a state we should never run into. The issue only seems to >

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-24 Thread Daniel Borkmann
On 12/24/2016 08:34 AM, Cong Wang wrote: On Thu, Dec 22, 2016 at 4:26 PM, Daniel Borkmann wrote: On 12/22/2016 08:05 PM, Cong Wang wrote: On Wed, Dec 21, 2016 at 1:07 PM, Daniel Borkmann wrote: Ok, you mean for net. In that case I prefer the

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-23 Thread Cong Wang
On Thu, Dec 22, 2016 at 4:26 PM, Daniel Borkmann wrote: > On 12/22/2016 08:05 PM, Cong Wang wrote: >> >> On Wed, Dec 21, 2016 at 1:07 PM, Daniel Borkmann >> wrote: >>> >>> >>> Ok, you mean for net. In that case I prefer the smaller sized fix to be >>>

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread Daniel Borkmann
On 12/22/2016 08:05 PM, Cong Wang wrote: On Wed, Dec 21, 2016 at 1:07 PM, Daniel Borkmann wrote: Ok, you mean for net. In that case I prefer the smaller sized fix to be honest. It also covers everything from the point where we fetch the chain via cops->tcf_chain() to the

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread Daniel Borkmann
On 12/22/2016 06:50 PM, John Fastabend wrote: On 16-12-22 08:53 AM, David Miller wrote: From: Daniel Borkmann Date: Wed, 21 Dec 2016 22:07:48 +0100 Ok, you mean for net. In that case I prefer the smaller sized fix to be honest. It also covers everything from the point

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread Daniel Borkmann
On 12/22/2016 02:16 PM, Shahar Klein wrote: On 12/21/2016 7:04 PM, Daniel Borkmann wrote: Shahar reported a soft lockup in tc_classify(), where we run into an endless loop when walking the classifier chain due to tp->next == tp which is a state we should never run into. The issue only seems to

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread Cong Wang
On Wed, Dec 21, 2016 at 1:07 PM, Daniel Borkmann wrote: > > Ok, you mean for net. In that case I prefer the smaller sized fix to be > honest. It also covers everything from the point where we fetch the chain > via cops->tcf_chain() to the end of the function, which is where

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread John Fastabend
On 16-12-22 08:53 AM, David Miller wrote: > From: Daniel Borkmann > Date: Wed, 21 Dec 2016 22:07:48 +0100 > >> Ok, you mean for net. In that case I prefer the smaller sized fix to >> be honest. It also covers everything from the point where we fetch >> the chain via

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread David Miller
From: Daniel Borkmann Date: Wed, 21 Dec 2016 22:07:48 +0100 > Ok, you mean for net. In that case I prefer the smaller sized fix to > be honest. It also covers everything from the point where we fetch > the chain via cops->tcf_chain() to the end of the function, which is >

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-22 Thread Shahar Klein
On 12/21/2016 7:04 PM, Daniel Borkmann wrote: Shahar reported a soft lockup in tc_classify(), where we run into an endless loop when walking the classifier chain due to tp->next == tp which is a state we should never run into. The issue only seems to trigger under load in the tc control path.

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Daniel Borkmann
On 12/21/2016 09:47 PM, Cong Wang wrote: On Wed, Dec 21, 2016 at 12:02 PM, Daniel Borkmann wrote: On 12/21/2016 08:10 PM, Cong Wang wrote: On Wed, Dec 21, 2016 at 10:51 AM, Cong Wang wrote: On Wed, Dec 21, 2016 at 9:04 AM, Daniel Borkmann

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Cong Wang
On Wed, Dec 21, 2016 at 12:02 PM, Daniel Borkmann wrote: > On 12/21/2016 08:10 PM, Cong Wang wrote: >> >> On Wed, Dec 21, 2016 at 10:51 AM, Cong Wang >> wrote: >>> >>> On Wed, Dec 21, 2016 at 9:04 AM, Daniel Borkmann >>>

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Daniel Borkmann
On 12/21/2016 08:10 PM, Cong Wang wrote: On Wed, Dec 21, 2016 at 10:51 AM, Cong Wang wrote: On Wed, Dec 21, 2016 at 9:04 AM, Daniel Borkmann wrote: What happens is that in tc_ctl_tfilter(), thread A allocates a new tp, initializes it, sets

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Cong Wang
On Wed, Dec 21, 2016 at 10:51 AM, Cong Wang wrote: > On Wed, Dec 21, 2016 at 9:04 AM, Daniel Borkmann wrote: >> What happens is that in tc_ctl_tfilter(), thread A allocates a new >> tp, initializes it, sets tp_created to 1, and calls into

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Daniel Borkmann
On 12/21/2016 07:51 PM, Cong Wang wrote: On Wed, Dec 21, 2016 at 9:04 AM, Daniel Borkmann wrote: What happens is that in tc_ctl_tfilter(), thread A allocates a new tp, initializes it, sets tp_created to 1, and calls into tp->ops->change() with it. In that classifier

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Cong Wang
On Wed, Dec 21, 2016 at 9:04 AM, Daniel Borkmann wrote: > What happens is that in tc_ctl_tfilter(), thread A allocates a new > tp, initializes it, sets tp_created to 1, and calls into tp->ops->change() > with it. In that classifier callback we had to unlock/lock the rtnl >

Re: [PATCH net] net, sched: fix soft lockup in tc_classify

2016-12-21 Thread Eric Dumazet
On Wed, 2016-12-21 at 18:04 +0100, Daniel Borkmann wrote: > Shahar reported a soft lockup in tc_classify(), where we run into an > endless loop when walking the classifier chain due to tp->next == tp > which is a state we should never run into. The issue only seems to > trigger under load in the