[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWmcBtQn8+g-QG2UKENeWYD=Zqq_78E8oNxS7tkLi0Cvw@mail.gmail.com>
Date: Mon, 11 Jun 2018 13:02:32 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: David Miller <davem@...emloft.net>,
Jacob Keller <jacob.e.keller@...el.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [net] fq_codel: fix NULL pointer deref in fq_codel_reset
On Mon, Jun 11, 2018 at 10:00 AM, Jeff Kirsher
<jeffrey.t.kirsher@...el.com> wrote:
>
> We could mitigate some of these issues by changing fq_codel_init to more
> explicitly cleanup after itself when failing. For example, we could
> ensure that q->flowcnt was set to 0 so that the loop over each flow in
> fq_codel_reset would not trigger. However, this would not prevent a NULL
> pointer dereference when attempting to memset the q->backlogs.
Are you saying memset(ptr, 0, 0) is not nop?? :-/
Making q->flows_cnt 0 is simpler and easier to understand.
Powered by blists - more mailing lists