Re: [PATCH] cpuset : Handling improper memory allocation.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Jackson
Date: Wednesday, August 6, 2008 - 1:37 pm

Max wrote:

This might be a good place for a comment, since unchecked kmalloc()
calls look dangerous:

	/* Convert <csn, csa> to <ndoms, doms> */
	doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL);
	if (!doms)
		goto rebuild;
	dattr = kmalloc(ndoms * sizeof(struct sched_domain_attr), GFP_KERNEL);
	/* dattr == NULL is ok; partition_sched_domains() can cope with it. */

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] cpuset : Handling improper memory allocation., Rakib Mullick, (Wed Aug 6, 10:22 am)
Re: [PATCH] cpuset : Handling improper memory allocation., Max Krasnyansky, (Wed Aug 6, 1:13 pm)
Re: [PATCH] cpuset : Handling improper memory allocation., Paul Jackson, (Wed Aug 6, 1:37 pm)
Re: [PATCH] cpuset : Handling improper memory allocation., Max Krasnyansky, (Wed Aug 6, 1:43 pm)