[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190828.144640.1256529135313631776.davem@davemloft.net>
Date: Wed, 28 Aug 2019 14:46:40 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dcaratti@...hat.com
Cc: xiyou.wangcong@...il.com, jhs@...atatu.com, jiri@...nulli.us,
netdev@...r.kernel.org, pabeni@...hat.com, sbrivio@...hat.com,
shuali@...hat.com
Subject: Re: [PATCH net v2] net/sched: pfifo_fast: fix wrong dereference
when qdisc is reset
From: Davide Caratti <dcaratti@...hat.com>
Date: Tue, 27 Aug 2019 12:29:09 +0200
> Now that 'TCQ_F_CPUSTATS' bit can be cleared, depending on the value of
> 'TCQ_F_NOLOCK' bit in the parent qdisc, we need to be sure that per-cpu
> counters are present when 'reset()' is called for pfifo_fast qdiscs.
> Otherwise, the following script:
...
> can generate the following splat:
...
> Fix this by testing the value of 'TCQ_F_CPUSTATS' bit in 'qdisc->flags',
> before dereferencing 'qdisc->cpu_qstats'.
>
> Changes since v1:
> - coding style improvements, thanks to Stefano Brivio
>
> Fixes: 8a53e616de29 ("net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too")
> CC: Paolo Abeni <pabeni@...hat.com>
> Reported-by: Li Shuang <shuali@...hat.com>
> Signed-off-by: Davide Caratti <dcaratti@...hat.com>
Applied and queued up for v5.2 -stable.
Powered by blists - more mailing lists