linux_old1/arch/x86/kernel/cpu/mcheck
Tony Luck a3125494cf x86/mce: Avoid using object after free in genpool
When we loop over all queued machine check error records to pass them
to the registered notifiers we use llist_for_each_entry(). But the loop
calls gen_pool_free() for the entry in the body of the loop - and then
the iterator looks at node->next after the free.

Use llist_for_each_entry_safe() instead.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Cc: Gong Chen <gong.chen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/0205920@agluck-desk.sc.intel.com
Link: http://lkml.kernel.org/r/1459929916-12852-4-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-13 10:54:00 +02:00
..
Makefile x86/mce: Provide a lockless memory pool to save error records 2015-08-13 10:12:50 +02:00
mce-apei.c x86/mce: Avoid potential deadlock due to printk() in MCE context 2015-08-13 10:12:51 +02:00
mce-genpool.c x86/mce: Avoid using object after free in genpool 2016-04-13 10:54:00 +02:00
mce-inject.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
mce-internal.h x86/mce: Add a wrapper around mce_log() for injection 2015-08-13 10:12:53 +02:00
mce-severity.c x86/mce: Check for faults tagged in EXTABLE_CLASS_FAULT exception table entries 2016-02-18 09:22:42 +01:00
mce.c Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-15 09:32:27 -07:00
mce_amd.c x86/mce/AMD: Document some functionality 2016-03-08 11:48:15 +01:00
mce_intel.c x86/mce: Reenable CMCI banks when swiching back to interrupt mode 2015-08-13 10:12:52 +02:00
p5.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
therm_throt.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
threshold.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
winchip.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00