]> err.no Git - linux-2.6/commit
Avoid zero size allocation in cache_k8_northbridges()
authorBen Collins <ben.collins@ubuntu.com>
Wed, 23 May 2007 20:57:43 +0000 (13:57 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 24 May 2007 03:14:12 +0000 (20:14 -0700)
commit3c6df2a9177c010bf811c361149069e4bfd9bb11
tree151ece2576e9e2481057bc0107aba8c0cc864384
parent6754bb4de94098a0aaa23a600f0edb9a9454c252
Avoid zero size allocation in cache_k8_northbridges()

kmalloc for flush_words resulted in zero size allocation when no
k8_northbridges existed.  Short circuit the code path for this case.

Also remove uneeded zeroing of num_k8_northbridges just after checking if
it is zero.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/k8.c