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]
Date:	Mon, 10 May 2010 12:18:38 +0200
From:	Leon Woestenberg <leon.woestenberg@...il.com>
To:	Yong Zhang <yong.zhang@...driver.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: May the worker function free its struct_work (plus container)?

Hello Yong,

On Mon, May 10, 2010 at 6:52 AM, Yong Zhang <yong.zhang@...driver.com> wrote:
> On Mon, May 10, 2010 at 12:47:23AM +0200, Leon Woestenberg wrote:
>> Hello,
>>
>> may the worker function kfree() it's own work data structure?
>
> Actually, workqueue has no restriction on this kind of operation.
> But if you must be careful with the caller in case it will refer
> the freed struct.
>
Thanks. Is there API documentation or source code documentation that
confirms this is the case?

I would hate to write code that gets buggy due to the underlying
implementation assuming the work structure is available after the
worker function returned.

Regards,
-- 
Leon
--
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