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: <BYAPR11MB2632739E5D4E396955CE29CBFF6A0@BYAPR11MB2632.namprd11.prod.outlook.com>
Date:   Fri, 3 Jul 2020 08:57:55 +0000
From:   "Zhang, Qiang" <Qiang.Zhang@...driver.com>
To:     Petr Mladek <pmladek@...e.com>
CC:     "ben.dooks@...ethink.co.uk" <ben.dooks@...ethink.co.uk>,
        "bfields@...hat.com" <bfields@...hat.com>,
        "cl@...k-chips.com" <cl@...k-chips.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "tj@...nel.org" <tj@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 回复: [PATCH] kthread: Don't cancel a work that is being cancelled

Thank you for your advice,   if add kthread_cancel_work() without the "_sync"
it is be dangerous, But I think it is unnecessary to cancel  work which is be canceling.
________________________________________
发件人: linux-kernel-owner@...r.kernel.org <linux-kernel-owner@...r.kernel.org> 代表 Petr Mladek <pmladek@...e.com>
发送时间: 2020年7月3日 15:28
收件人: Zhang, Qiang
抄送: ben.dooks@...ethink.co.uk; bfields@...hat.com; cl@...k-chips.com; peterz@...radead.org; tj@...nel.org; linux-kernel@...r.kernel.org
主题: Re: [PATCH] kthread: Don't cancel a work that is being cancelled

On Thu 2020-07-02 12:43:24, qiang.zhang@...driver.com wrote:
> From: Zhang Qiang <qiang.zhang@...driver.com>
>
> When canceling a work, if it is found that the work is in
> the cancelling state, we should directly exit the cancelled
> operation.

No, the function guarantees that the work is not longer running
when it returns. This is why it has the suffix "_sync" in the name.

We would need to add kthread_cancel_work() without the "_sync"
wrappers that would not wait for the work in progress. But it
might be dangerous. The API users usually want to make sure
that the work in not longer running to avoid races.

What is the use case for the non-sync behavior, please?

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ