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 qdisc_destroy(). > not that it hurts to have the check here, but if init fails in qdisc_create it seems only ->destroy() is called without a ->reset(). Is there another path for init() to fail that I'm missing. > Fixes: c5ad119fb6c0 ("net: sched: pfifo_fast use skb_array") > Reported-by: syzbot <syzkal...@googlegroups.com> > Cc: John Fastabend <john.fastab...@gmail.com> > Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> > --- > net/sched/sch_generic.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >