Re: [PATCH] suhme

From: David S. Miller (davem@redhat.com)
Date: Sun Sep 21 2003 - 05:22:50 EST


On Sat, 20 Sep 2003 15:12:12 +0200
"Angelo Dell'Aera" <buffer@xxxxxxxxxxxx> wrote:

> Well taking a look at drivers/pci/search.c it's staten that
> pci_find_device() is not to be used anymore since the pci device
> returned by this function "can disappear at any moment in time".
> pci_get_device() is similar to pci_find_device() but it is
> safer since it increments a reference count to the pci_dev.
> So I thought that this change could be useful, even considering
> this function is called just at init time.

And what is going to drop the reference to the device when
we're done with it?

If do nothing but convert pci_find_device() uses into
pci_get_device() uses, you're create a device leak.

So in order to make these changes properly, you're going to
have to add the necessary device reference dropping as well
unless something else will take care of it.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html