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]
Message-ID: <20061016172341.GB5385@rhun.haifa.ibm.com>
Date:	Mon, 16 Oct 2006 19:23:41 +0200
From:	Muli Ben-Yehuda <muli@...ibm.com>
To:	Andi Kleen <ak@....de>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>, akpm@...l.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pci: x86-32/64 switch to pci_get API

On Mon, Oct 16, 2006 at 06:07:59PM +0200, Andi Kleen wrote:
> > --- linux.vanilla-2.6.19-rc1-mm1/arch/x86_64/kernel/pci-calgary.c	2006-10-13 15:10:06.000000000 +0100
> > +++ linux-2.6.19-rc1-mm1/arch/x86_64/kernel/pci-calgary.c	2006-10-13 17:14:40.000000000 +0100
> > @@ -879,7 +879,7 @@
> >  
> >  error:
> >  	do {
> > -		dev = pci_find_device_reverse(PCI_VENDOR_ID_IBM,
> > +		dev = pci_get_device_reverse(PCI_VENDOR_ID_IBM,
> >  					      PCI_DEVICE_ID_IBM_CALGARY,
> >  					      dev);
> 
> No put call anywhere?

The put is implicit in the call, since for each dev returned from
pci_get_device_reverse() we then call it with the same dev as the last
('from') parameter. We take a reference to dev elsewhere, just before
we start using it.

In any case these bridges can't be hot-plugged, so as long as the ref
count remains positive, we're fine.

Cheers,
Muli
-
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