On Thu, 7 Apr 2011, Roedel, Joerg wrote:

> So we could access the data structure without any locks if we want using
> atomic_t for the probe_count and isoc_reqs members. But as I've seen
> meanwhile the lock still needs to protect the access to the hardware in
> the usb_amd_quirk_pll() function.
> So its probably not worth the work, what do you think?

You might as well use the spinlock.

However, is there a good reason to zero out the amd_chipset members in
usb_amd_dev_put()?  Can these things be added and removed dynamically?  
If they can't then the data should remain valid indefinitely once it
has been probed, and you could call pci_dev_put() at the end of
usb_amd_find_chipset_info().

And if they can, is it valid to call pci_dev_put() in usb_amd_dev_put()  
while holding a spinlock?  You might want to move those calls to the
end of the function.

Alan Stern

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to