lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <46FD8907.6000304@oracle.com>
Date:	Fri, 28 Sep 2007 16:06:47 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Maarten Bressers <mbres@...too.org>
CC:	linux-kernel@...r.kernel.org
Subject: Re: On Fri, 28 Sep 2007 14:48:53 -0700

Maarten Bressers wrote:
> Randy Dunlap <randy.dunlap@...cle.com> wrote:
> 
>> On Fri, 28 Sep 2007 20:56:30 +0000 (UTC) Maarten Bressers wrote:
>>
>>> This (trivial) patch fixes two compiler warnings for 2.6.23-rc8 on x86_64,
>>> use of deprecated function pci_find_device() and a section mismatch.
>>> Build log and .config file included.

>>> diff --git a/drivers/pci/search.c b/drivers/pci/search.c
>>> index c6e79d0..0eb7e9e 100644
>>> --- a/drivers/pci/search.c
>>> +++ b/drivers/pci/search.c
>>> @@ -96,7 +96,7 @@ pci_find_slot(unsigned int bus, unsigned int devfn)
>>>  {
>>>  	struct pci_dev *dev = NULL;
>>>  
>>> -	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
>>> +	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
>>>  		if (dev->bus->number == bus && dev->devfn == devfn)
>>>  			return dev;
>>>  	}
>>> @@ -434,8 +434,6 @@ int pci_dev_present(const struct pci_device_id *ids)
>>>  EXPORT_SYMBOL(pci_dev_present);
>>>  EXPORT_SYMBOL(pci_find_present);
>>>  
>>> -EXPORT_SYMBOL(pci_find_device);
>>> -EXPORT_SYMBOL(pci_find_slot);
>> There are still about 30 and 14 respetively users of pci_find_devic()
>> and pci_find_slot() in 2.6.23-rc8.  Will you be fixing them?
>>
> I'm attaching a patch here that I think will clean up all uses of 
> pci_find_device(), except one in drivers/net/skfp/drvfbi.c:1248. I'm not 
> sure what to make of that one, do you have any suggestions?
> 
> Is this patch what you had in mind, Randy? Any comments are appreciated.

It's more than a simple s/pci_find_device/pci_get_device/g patch.

pci_find_device() didn't use any reference counting, but pci_get_device()
does.  Then when the resource use is finished, it must be released
properly.

>>>  /* For boot time work */
>>>  EXPORT_SYMBOL(pci_find_bus);
>>>  EXPORT_SYMBOL(pci_find_next_bus);
>> ---

-- 
~Randy
Phaedrus says that Quality is about caring.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ