lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221025000314.9966-1-kuniyu@amazon.com>
Date:   Mon, 24 Oct 2022 17:03:14 -0700
From:   Kuniyuki Iwashima <kuniyu@...zon.com>
To:     <shaozhengchao@...wei.com>
CC:     <davem@...emloft.net>, <edumazet@...gle.com>, <jhs@...atatu.com>,
        <jiri@...nulli.us>, <kaber@...sh.net>, <kuba@...nel.org>,
        <netdev@...r.kernel.org>, <pabeni@...hat.com>,
        <weiyongjun1@...wei.com>, <xiyou.wangcong@...il.com>,
        <yuehaibing@...wei.com>, <kuniyu@...zon.com>
Subject: Re: [PATCH net] net: sched: cbq: stop timer in cbq_destroy() when cbq_init() fails

From:   shaozhengchao <shaozhengchao@...wei.com>
Date:   Mon, 24 Oct 2022 18:53:30 +0800
> On 2022/10/23 10:54, Cong Wang wrote:
> > On Sat, Oct 22, 2022 at 06:40:54PM +0800, Zhengchao Shao wrote:
> >> When qdisc_create() fails to invoke the cbq_init() function for
> >> initialization, the timer has been started. But cbq_destroy() doesn't
> >> stop the timer. Fix it.
> >>
> > 
> > Hmm? qdisc_watchdog_init() only initializes it, not starts it, right?
> > 
> > Thanks.
> Hi Wang:
> 	Thank you for your review. The description is incorrect,
> qdisc_watchdog_init() only initializes timer, and cbq_destroy() missed
> to cancle timer.

In the ->init() failure path, we need not cancel timer.  Another path
where we call ->destroy() is qdisc_destroy(), but just before calling
->destroy(), we call qdisc_reset() and cbq_reset() cancels the timer.

So, I think we need not add qdisc_watchdog_cancel() in cbq_destroy().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ