[Linux-parport] [PATCH] fix parport_serial_pci_resume() ignoring return value from pci_enable_device()

Jiri Kosina jikos at jikos.cz
Thu Oct 12 20:03:28 EDT 2006


On Fri, 13 Oct 2006, Russell King wrote:

> 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*.

You are right, I missed this.

I am not currently sure what the proper fix is, though. We might be also 
ending doing very bad things, when we ignore the error returned by 
pci_enable_device() and proceed operating on non-existing device.

Thanks for spotting this,

-- 
Jiri Kosina



More information about the Linux-parport mailing list