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: <20130305224444.GC1227@htj.dyndns.org>
Date:	Tue, 5 Mar 2013 14:44:44 -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

Hello,

On Wed, Mar 06, 2013 at 09:40:48AM +1100, Ryan Mallon wrote:
> > Ooh, right, and that cpumask_t is going away and you can't statically
> > allocate cpumask_var_t, so it needs an allocation and error check from
> > it anyway.
> 
> Not sure I follow. I mean drop the pointer, eg:
> 
> 	struct workqueue_attr attrs;
> 
> Since, at least in this patch, struct worker_pool appears to always
> alloc the attrs field. You do still of course need the cpumask_t
> initialisation. Am I missing something?

So, new usages of cpumask_t is frowned upon and we gotta use
cpumask_var_t which needs alloc_cpumask_var() which may fail, so we
have try-to-alloc-and-check-for-failure no matter what.  Now, if we
want to embed workqueue_attrs, we have to separate out initialization
of allocated attrs from the actaul allocation.  ie. we'll need
init_workqueue_attrs() and alloc_workqueue_attrs() and as the former
may fail too, it doesn't really simplify pool initilaization path.
So, we end up with more code.  The added code is minor but it also
doesn't buy anything.

Thanks.

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