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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 26 Oct 2008 12:34:13 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Yu Zhao <yu.zhao@...scape.net>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>, linux-pci@...r.kernel.org,
	greg@...ah.com, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, stable@...nel.org,
	Rakib Mullick <rakib.mullick@...il.com>
Subject: Re: [PATCH] pci: Fixing drivers/pci/search.c compilation warning.

On Sun, Oct 26, 2008 at 08:51:25PM +0800, Yu Zhao wrote:
> This reminds me of other problems of PCI search functions.
> 
> The 'dev_start' is passed to bus_find_device(), and its 'knode_bus' 
> reference count is decreased by klist_iter_init_node() in that function. 
> The problem is the reference count may be already decrease to 0 because 
> the PCI device 'from' is hot-plugged off (e.g., pci_remove_bus) when the 
> search goes. A warning is fired when klist_iter_init_node() detects the 
> reference count becomes 0.
> 
> Some code uses pci_find_device() in a way that is not safe with the 
> hotplug, because a device may be destroyed after bus_find_device() 
> returns it and before it's held by pci_dev_get() in the next round. 
> Following is an example from a random grep:

Yes, that's why pci_find_device() is deprecated.  But it doesn't also
need to be buggy ;-)

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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