driver core: check start node in klist_iter_init_node
authorHannes Reinecke <[email protected]>
Mon, 16 Apr 2012 13:06:25 +0000 (15:06 +0200)
committerGreg Kroah-Hartman <[email protected]>
Wed, 18 Apr 2012 22:39:52 +0000 (15:39 -0700)
commita15d49fd3094cff90e5410ca454a870e0a722fe1
treef3e458fa4ce3524f756e0faa48d5ed2400c022bf
parent97ec448aeadff55234368a89c4a07a7ef290a084
driver core: check start node in klist_iter_init_node

klist_iter_init_node() takes a node as a start argument.
However, this node might not be valid anymore.
This patch updates the klist_iter_init_node() and
dependent functions to return an error if so.
All calling functions have been audited to check
for a return code here.

Signed-off-by: Hannes Reinecke <[email protected]>
Cc: Greg Kroah-Hartmann <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Stable Kernel <[email protected]>
Cc: Linux Kernel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/base/bus.c
drivers/base/class.c
drivers/base/driver.c
include/linux/device.h
include/linux/klist.h
lib/klist.c