projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95b0867
)
x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.
author
Andi Kleen
<
[email protected]
>
Tue, 11 Sep 2007 12:02:11 +0000
(14:02 +0200)
committer
Linus Torvalds
<
[email protected]
>
Wed, 12 Sep 2007 16:28:06 +0000
(09:28 -0700)
AK: Removed the unlikelies because gcc heuristics default to unlikely
AK: for test == NULL and for negative returns.
Cc: Venkatesh Pallipadi <
[email protected]
>
Cc: Ashok Raj <
[email protected]
>
Cc: Akinobu Mita <
[email protected]
>
Signed-off-by: Jan Beulich <
[email protected]
>
Signed-off-by: Andi Kleen <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/i386/kernel/cpu/intel_cacheinfo.c
patch
|
blob
|
history
diff --git
a/arch/i386/kernel/cpu/intel_cacheinfo.c
b/arch/i386/kernel/cpu/intel_cacheinfo.c
index d5a456d27d82420c3d690f51af5a80a8e940c937..db6c25aa57768f67f7cdb4a794ece94aece18fa0 100644
(file)
--- a/
arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/
arch/i386/kernel/cpu/intel_cacheinfo.c
@@
-515,7
+515,7
@@
static int __cpuinit detect_cache_attributes(unsigned int cpu)
cpuid4_info[cpu] = kzalloc(
sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL);
- if (
unlikely(cpuid4_info[cpu] == NULL)
)
+ if (
cpuid4_info[cpu] == NULL
)
return -ENOMEM;
oldmask = current->cpus_allowed;
@@
-748,6
+748,8
@@
static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
unsigned int cpu = sys_dev->id;
unsigned long i;
+ if (cpuid4_info[cpu] == NULL)
+ return;
for (i = 0; i < num_cache_leaves; i++) {
cache_remove_shared_cpu_map(cpu, i);
kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj));