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:	Wed, 15 May 2013 10:16:00 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Tejun Heo <tj@...nel.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/workqueue.c: better to free related resources
 when failure occurs in wq_numa_init()

On 05/14/2013 11:17 PM, Tejun Heo wrote:
> On Tue, May 14, 2013 at 08:25:20PM +0800, Chen Gang wrote:
>>
>> When NUMA node mapping not available for one cpu, need disabling NUMA
>> support and proceed.
>>
>> Also better to release unused resources (the original code can not
>> cause issue, only waste some memory).
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@...anux.com>
>> ---
>>  kernel/workqueue.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
>> index 1ae6028..a763079 100644
>> --- a/kernel/workqueue.c
>> +++ b/kernel/workqueue.c
>> @@ -4911,6 +4911,9 @@ static void __init wq_numa_init(void)
>>  		if (WARN_ON(node == NUMA_NO_NODE)) {
>>  			pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
>>  			/* happens iff arch is bonkers, let's just proceed */
>> +			for_each_node(node)
>> +				free_cpumask_var(tbl[node]);
>> +			kfree(tbl);
> 
> Eh... let's just leave it alone.  The path is taken iff the whole
> thing is seriously broken and we're triggering WARN.  I don't think we
> need to worry about small memory wastage there.
> 
> Thanks.
> 

OK, I can understand. I will continue to try to find and make another
patches.


Thanks.
-- 
Chen Gang

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