Re: [Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2018-01-02 Thread David Miller
From: Cong Wang Date: Thu, 21 Dec 2017 16:03:30 -0800 > __skb_array_empty() is only safe if array is never resized. > pfifo_fast_dequeue() is called in TX BH context and without > qdisc lock, so even after we disable BH on ->reset() path > we can still race with other

Re: [Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2017-12-27 Thread John Fastabend
On 12/27/2017 10:29 AM, Cong Wang wrote: > On Sat, Dec 23, 2017 at 10:57 PM, John Fastabend > wrote: >> On 12/22/2017 12:31 PM, Cong Wang wrote: >>> I understand why you had it, but it is just not safe. You don't want >>> to achieve performance gain by crashing system,

Re: [Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2017-12-27 Thread Cong Wang
On Sat, Dec 23, 2017 at 10:57 PM, John Fastabend wrote: > On 12/22/2017 12:31 PM, Cong Wang wrote: >> I understand why you had it, but it is just not safe. You don't want >> to achieve performance gain by crashing system, right? > > huh? So my point is the patch you

Re: [Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2017-12-23 Thread John Fastabend
On 12/22/2017 12:31 PM, Cong Wang wrote: > On Thu, Dec 21, 2017 at 7:06 PM, John Fastabend > wrote: >> On 12/21/2017 04:03 PM, Cong Wang wrote: >>> __skb_array_empty() is only safe if array is never resized. >>> pfifo_fast_dequeue() is called in TX BH context and without

Re: [Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2017-12-22 Thread Cong Wang
On Thu, Dec 21, 2017 at 7:06 PM, John Fastabend wrote: > On 12/21/2017 04:03 PM, Cong Wang wrote: >> __skb_array_empty() is only safe if array is never resized. >> pfifo_fast_dequeue() is called in TX BH context and without >> qdisc lock, so even after we disable BH on

Re: [Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2017-12-21 Thread John Fastabend
On 12/21/2017 04:03 PM, Cong Wang wrote: > __skb_array_empty() is only safe if array is never resized. > pfifo_fast_dequeue() is called in TX BH context and without > qdisc lock, so even after we disable BH on ->reset() path > we can still race with other CPU's. > > Fixes: c5ad119fb6c0 ("net:

[Patch net-next] net_sched: remove the unsafe __skb_array_empty()

2017-12-21 Thread Cong Wang
__skb_array_empty() is only safe if array is never resized. pfifo_fast_dequeue() is called in TX BH context and without qdisc lock, so even after we disable BH on ->reset() path we can still race with other CPU's. Fixes: c5ad119fb6c0 ("net: sched: pfifo_fast use skb_array") Reported-by: Jakub