[PATCH] device_shutdown can loop if the driver frees itself
authorMichael Richardson <mcr@sandelman.ottawa.on.ca>
Mon, 9 Jan 2006 09:04:51 +0000 (01:04 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Jan 2006 19:26:12 +0000 (11:26 -0800)
This patch changes device_shutdown() to use the newly introduced safe
reverse list traversal.  We experienced loops on system reboot if we had
removed and re-inserted our device from the device list.

We noticed this problem on PPC405. Our PCI IDE device comes and goes a lot.

Our hypothesis was that there was a loop caused by the driver->shutdown
freeing memory.  It is possible that we do something wrong as well, but
being unable to reboot is kind of nasty.

Signed-off-by: Michael Richardson <mcr@marajade.sandelman.ca>
Cc: Patrick Mochel <mochel@digitalimplant.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

No differences found