Messages in this thread | | | Date | Sat, 14 Oct 2006 20:52:06 -0700 | From | Greg KH <> | Subject | Re: [PATCH 1/1] Char: correct pci_get_device changes |
| |
On Sun, Oct 15, 2006 at 01:36:45AM +0200, Jiri Slaby wrote: > correct pci_get_device changes > > Commits 881a8c120acf7ec09c90289e2996b7c70f51e996 and > efe1ec27837d6639eae82e1f5876910ba6433c3f are totally wrong and > "Replace pci_find_device() with more safer pci_get_device()." holds only for a > very short time until next iteration of pci_get_device is called (and > refcount is decreased again there). > > Whenever pci_find_device -> pci_get_device change is performed, also > pci_dev_get and pci_dev_put should be in most cases called. If not, it's > not easy to find such issues and this is example of such case. Here it > was made safer in no way but a moment during initialization, weird. > > It affects moxa and rio char drivers. (All this stuff deserves to be > converted to pci_probing, though.) > > Cc: <R.E.Wolff@BitWizard.nl> > Cc: Amit Gud <gud@eth.net> > Cc: Greg Kroah-Hartman <gregkh@suse.de> > Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |