]> git.baikalelectronics.ru Git - kernel.git/commit
dmi: prevent linked list corruption
authorJean Delvare <khali@linux-fr.org>
Sat, 23 Feb 2008 23:23:55 +0000 (15:23 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 24 Feb 2008 01:12:15 +0000 (17:12 -0800)
commitb2e789ca6695ef30b1c7c5f039847ff6135374fb
tree7f6b9a8a20cd76374e67d50917716f270e82cb19
parentfb12120411b6d16687f9fe1153b4770bdb168270
dmi: prevent linked list corruption

Adding the same item to a given linked list more than once is guaranteed
to break and corrupt the list.  This is however what we do in dmi_scan
since commit 9b312767ebf14f4e3189a3b3f4de96797d3a2d97 ("x86: fix DMI out
of memory problems").

Given that there is absolutely no interest in saving empty OEM strings
anyway, I propose the simple and efficient fix below: we discard the empty
OEM strings altogether.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Parag Warudkar <parag.warudkar@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/firmware/dmi_scan.c