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:	Sat, 20 Dec 2008 15:31:40 -0800
From:	Greg KH <gregkh@...e.de>
To:	Vegard Nossum <vegard.nossum@...il.com>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pci: fix no_pci_devices() #2

On Sat, Dec 20, 2008 at 12:14:19PM +0100, Vegard Nossum wrote:
> On Sat, Dec 20, 2008 at 11:56 AM, Vegard Nossum <vegard.nossum@...il.com> wrote:
> > On Sat, Dec 20, 2008 at 9:58 AM, Greg KH <gregkh@...e.de> wrote:
> >> Care to make a patch for no_pci_devices() to work properly in this kind
> >> of situation?
> >
> > How does this look?
> >
> > I have introduced a variable pci_is_initiated, which is set after the bus
> > has been registered.
> 
> This patch is simpler and also works for me. But I am not too fond of it
> either...
> 
> 
> Vegard
> 
> 
> >From 1f047c86fc7a831d85174452da92344a3582a158 Mon Sep 17 00:00:00 2001
> From: Vegard Nossum <vegard.nossum@...il.com>
> Date: Sat, 20 Dec 2008 12:08:18 +0100
> Subject: [PATCH] pci: fix no_pci_devices() #2
> 
> In short, no_pci_devices() should not use bus_find_device() before
> initcalls have run, because the pci bus structure has not been
> initialized yet.
> 
> Reference: http://lkml.org/lkml/2008/12/20/21
> 
> Cc: Greg KH <gregkh@...e.de>
> Cc: Pekka Enberg <penberg@...helsinki.fi>
> Signed-off-by: Vegard Nossum <vegard.nossum@...il.com>
> ---
>  drivers/base/bus.c  |    1 +
>  drivers/pci/probe.c |    3 +++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index 5aee1c0..5e83faf 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -931,6 +931,7 @@ bus_devices_fail:
>  bus_uevent_fail:
>  	kset_unregister(&bus->p->subsys);
>  	kfree(bus->p);
> +	bus->p = NULL;
>  out:
>  	return retval;

I like this portion anyway, care to break this out into a separate
patch and send it to me?

The first one also looks good to me, Jesse, feel free to add my:
	Acked-by: Greg Kroah-Hartman <gregkh@...e.de>

thanks,

greg k-h
--
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