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:	Tue, 5 Mar 2013 15:28:28 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Ryan Mallon <rmallon@...il.com>
Cc:	linux-kernel@...r.kernel.org, laijs@...fujitsu.com,
	axboe@...nel.dk, jmoyer@...hat.com, zab@...hat.com,
	kbuild test robot <fengguang.wu@...el.com>
Subject: Re: [PATCH v2 16/31] workqueue: introduce workqueue_attrs

On Wed, Mar 06, 2013 at 10:20:20AM +1100, Ryan Mallon wrote:
> I don't get why you would need to separate init/alloc. Nothing in the
> patch series appears to have optional attrs (e.g. a case where attrs

Because workqueue users would want to use workqueue_attrs to specify
attributes and thanks to cpumask_var_t we need alloc interface anyway
and by just allocating the whole thing dynamically we can allow
workqueue_attrs to grow beyond size which is appropriate to allocate
on stack.  Plus, its users are less likely to make mistakes with plain
alloc/free interface than init interface which takes pointer to an
existing object but may fail, which is rather unusual.

Whether the struct itself is dynamic or not just doesn't matter and
it's just easier to have plain alloc/free if there has to be an init
step which may fail.

-- 
tejun
--
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