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 <[email protected]>
> Cc: John Fastabend <[email protected]>
> Signed-off-by: Cong Wang <[email protected]>
> ---
> net/sched/sch_generic.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>