* [PATCH] intel_cacheinfo: fix use-after-free cache_kobject
@ 2008-07-15 8:09 Akinobu Mita
2008-07-18 15:51 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2008-07-15 8:09 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
This avoids calling kobject_uevent() with cache_kobject that has
already been deallocated in an error path.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/kernel/cpu/intel_cacheinfo.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Index: 2.6-mmotm/arch/x86/kernel/cpu/intel_cacheinfo.c
===================================================================
--- 2.6-mmotm.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ 2.6-mmotm/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -780,15 +780,14 @@ static int __cpuinit cache_add_dev(struc
}
kobject_put(per_cpu(cache_kobject, cpu));
cpuid4_cache_sysfs_exit(cpu);
- break;
+ return retval;
}
kobject_uevent(&(this_object->kobj), KOBJ_ADD);
}
- if (!retval)
- cpu_set(cpu, cache_dev_map);
+ cpu_set(cpu, cache_dev_map);
kobject_uevent(per_cpu(cache_kobject, cpu), KOBJ_ADD);
- return retval;
+ return 0;
}
static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] intel_cacheinfo: fix use-after-free cache_kobject
2008-07-15 8:09 [PATCH] intel_cacheinfo: fix use-after-free cache_kobject Akinobu Mita
@ 2008-07-18 15:51 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-07-18 15:51 UTC (permalink / raw)
To: Akinobu Mita; +Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
* Akinobu Mita <akinobu.mita@gmail.com> wrote:
> This avoids calling kobject_uevent() with cache_kobject that has
> already been deallocated in an error path.
applied to tip/x86/urgent, thanks.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-18 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 8:09 [PATCH] intel_cacheinfo: fix use-after-free cache_kobject Akinobu Mita
2008-07-18 15:51 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox