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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACvQF52ej3mzwRhoGO0jmZq7GLOC_KJcxF+R2O1sqQaonYWqnw@mail.gmail.com>
Date:	Wed, 6 Feb 2013 19:42:24 +0800
From:	Lai Jiangshan <eag0628@...il.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/13] workqueue: fix work_busy()

On Wed, Feb 6, 2013 at 2:53 AM, Tejun Heo <tj@...nel.org> wrote:
> Hello,
>
> On Tue, Feb 05, 2013 at 08:06:54PM +0800, Lai Jiangshan wrote:
>> >>@@ -3453,15 +3451,13 @@ unsigned int work_busy(struct work_struct *work)
>> >>  {
>> >>    struct worker_pool *pool = get_work_pool(work);
>> >>    unsigned long flags;
>> >>-   unsigned int ret = 0;
>> >>+   unsigned int ret = work_pending(work) ? WORK_BUSY_PENDING : 0;
>> >
>> >I'd prefer this as a if() statement.
>> >
>> >>    if (!pool)
>> >>-           return 0;
>> >>+           return ret;
>> >
>> >I'm a bit confused.  When can we be pending w/o pool?
>> >
>>
>> grab the pending bits <==time==> really queued
>>                       ^
>>               this patch considers the work is busy in this time
>
> Given the advisory nature of the function, why do we care?  Is it
> needed for later patches?
>

Ah, yes.

Thanks,
Lai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ