[Linux-parport] [PATCH] fix parport_serial_pci_resume() ignoring return value from pci_enable_device()
rmk+lkml at arm.linux.org.uk
Thu Oct 12 19:58:21 EDT 2006
On Fri, Oct 13, 2006 at 01:44:24AM +0200, Jiri Kosina wrote:
> (I guess that the parport_serial_pci_remove() is the right way(tm) to
> remove the device from the system in non-destructive way even in case
> pci_enable_device() failed. Tim?)
I suspect all these kind of patches are introducing additional problems.
This one certainly is. Who's auditing all these patches? I mean _properly_
auditing them rather than just saying "that's a good idea"?
In this case, you're calling parport_serial_pci_remove() in the failure
path. That's fine, but this opens the possibility of it being called
twice - once on resume failure and once when the device/driver is
removed. If this happens, we dereference a NULL pointer. *BAD*.
So, the original without this resume fix is probably far better than
with the fix.
So, patch violently rejected.
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
More information about the Linux-parport