Re: [Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-19 Thread David Miller
From: Cong Wang Date: Mon, 18 Dec 2017 14:34:26 -0800 > First, the check of &q->ring.queue against NULL is wrong, it > is always false. We should check the value rather than the address. > > Secondly, we need the same check in pfifo_fast_reset() too, > as both ->reset() and ->destroy() are calle

Re: [Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-18 Thread John Fastabend
On 12/18/2017 08:31 PM, Cong Wang wrote: > On Mon, Dec 18, 2017 at 7:58 PM, John Fastabend > wrote: >> On 12/18/2017 06:20 PM, Cong Wang wrote: >>> On Mon, Dec 18, 2017 at 5:25 PM, John Fastabend >>> wrote: On 12/18/2017 02:34 PM, Cong Wang wrote: > First, the check of &q->ring.queue aga

Re: [Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-18 Thread Cong Wang
On Mon, Dec 18, 2017 at 7:58 PM, John Fastabend wrote: > On 12/18/2017 06:20 PM, Cong Wang wrote: >> On Mon, Dec 18, 2017 at 5:25 PM, John Fastabend >> wrote: >>> On 12/18/2017 02:34 PM, Cong Wang wrote: First, the check of &q->ring.queue against NULL is wrong, it is always false. We sh

Re: [Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-18 Thread John Fastabend
On 12/18/2017 06:20 PM, Cong Wang wrote: > On Mon, Dec 18, 2017 at 5:25 PM, John Fastabend > wrote: >> On 12/18/2017 02:34 PM, Cong Wang wrote: >>> First, the check of &q->ring.queue against NULL is wrong, it >>> is always false. We should check the value rather than the address. >>> >> >> Thanks.

Re: [Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-18 Thread Cong Wang
On Mon, Dec 18, 2017 at 5:25 PM, John Fastabend wrote: > On 12/18/2017 02:34 PM, Cong Wang wrote: >> First, the check of &q->ring.queue against NULL is wrong, it >> is always false. We should check the value rather than the address. >> > > Thanks. > >> Secondly, we need the same check in pfifo_fas

Re: [Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-18 Thread John Fastabend
On 12/18/2017 02:34 PM, Cong Wang wrote: > First, the check of &q->ring.queue against NULL is wrong, it > is always false. We should check the value rather than the address. > Thanks. > Secondly, we need the same check in pfifo_fast_reset() too, > as both ->reset() and ->destroy() are called in

[Patch net-next] net_sched: properly check for empty skb array on error path

2017-12-18 Thread Cong Wang
First, the check of &q->ring.queue against NULL is wrong, it is always false. We should check the value rather than the address. Secondly, we need the same check in pfifo_fast_reset() too, as both ->reset() and ->destroy() are called in qdisc_destroy(). Fixes: c5ad119fb6c0 ("net: sched: pfifo_fas