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: <200911132108.56691.rjw@sisk.pl>
Date:	Fri, 13 Nov 2009 21:08:56 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Breno Leitao <leitao@...ux.vnet.ibm.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linux PCI <linux-pci@...r.kernel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>
Subject: Re: PCI: pci_restore_state() is returning 0 when it fails

On Friday 13 November 2009, Breno Leitao wrote:
> Actually pci_restore_state() is returning 0 if the restore process
> fails, instead of a error value.
> 
> If it fails, I believe that it should return -EPERM, once that
> it is an invalid operation and probably pci_save_state() wasn't
> called.

I believe this patch will break a number of things.

Does it actually fix any problem you have observed?

Rafael


> Signed-off-by: Breno Leitao <leitao@...ux.vnet.ibm.com>
> ---
>  drivers/pci/pci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 4e4c295..b677ca3 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -857,7 +857,7 @@ pci_restore_state(struct pci_dev *dev)
>  	u32 val;
>  
>  	if (!dev->state_saved)
> -		return 0;
> +		return -EPERM;
>  
>  	/* PCI Express register must be restored first */
>  	pci_restore_pcie_state(dev);
> 

--
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