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]
Date:	Mon, 23 Apr 2007 22:24:56 +0800
From:	"Antonino A. Daplas" <adaplas@...il.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Nvidia/Riva FB: Switch to pci_get refcounting APIs not
	pci_find_slot

On Mon, 2007-04-23 at 15:01 +0100, Alan Cox wrote:
> Signed-off-by: Alan Cox <alan@...hat.com>

Thanks, and this actually helped expose 2 bugs.

>  	pll = NV_RD32(par->PRAMDAC0, 0x0500);
>  	M = (pll >> 0) & 0xFF;
>  	N = (pll >> 8) & 0xFF;
> @@ -707,19 +707,21 @@
>  	sim_data.pix_bpp = (char)pixelDepth;
>  	sim_data.enable_video = 0;
>  	sim_data.enable_mp = 0;
> -	pci_find_slot(0, 1);
> +	/* pci_find_slot(0, 1); */

This should have been dev = pci_find_slot/pci_get_bus_and_slot().


>  	pci_read_config_dword(dev, 0x7C, &sim_data.memory_type);
> +	pci_dev_put(dev);
>  	sim_data.memory_type = (sim_data.memory_type >> 12) & 1;
>  	sim_data.memory_width = 64;
>  
> -	dev = pci_find_slot(0, 3);
> +	dev = pci_get_bus_and_slot(0, 3);
>  	pci_read_config_dword(dev, 0, &memctrl);
> +	pci_dev_put(dev);
>  	memctrl >>= 16;
>  
>  	if ((memctrl == 0x1A9) || (memctrl == 0x1AB) || (memctrl == 0x1ED)) {
>  		int dimm[3];
>  
> -		pci_find_slot(0, 2);
> +		/* pci_find_slot(0, 2); */

Ditto.

Will resubmit.

Tony


-
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