]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] ns558 list handling fix
authorAlexander Nyberg <alexn@telia.com>
Wed, 10 Aug 2005 17:11:36 +0000 (10:11 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 10 Aug 2005 18:03:02 +0000 (11:03 -0700)
commit94de2fe66608f996366bc741de4cac3fd1b73dc5
treeb17c0fd6d98afc0af6920d18e096e7ab814189de
parentc15a99e8a9aa91dc03af055a7a4c8398535fdb5d
[PATCH] ns558 list handling fix

Need to use list_for_entry_safe(), as we're removing items during the
traversal.  list_for_each_entry() uses the first ptr also as an iterator, if
you kfree() it slab takes it, might poison it and then you try to use it to
iterate to the next object in list.

Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/input/gameport/ns558.c