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: <20080806153700.dc12e5dc.pj@sgi.com>
Date:	Wed, 6 Aug 2008 15:37:00 -0500
From:	Paul Jackson <pj@....com>
To:	Max Krasnyansky <maxk@...lcomm.com>
Cc:	rakib.mullick@...il.com, menage@...gle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpuset : Handling improper memory allocation.

Max wrote:
> partition_sched_domains() can deal with attrs==NULL case. So we do not
> have to abort domain building.

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@....com> 1.940.382.4214
--
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