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:	Tue, 27 Jan 2009 10:41:52 -0800
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	"Vegard Nossum" <vegard.nossum@...il.com>
Cc:	"Greg KH" <gregkh@...e.de>,
	"Pekka Enberg" <penberg@...helsinki.fi>,
	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pci: fix no_pci_devices() #2

On Friday, January 16, 2009 11:21 am Vegard Nossum wrote:
> On Fri, Jan 16, 2009 at 7:41 PM, Jesse Barnes <jbarnes@...tuousgeek.org> 
wrote:
> >> > Assuming Greg already took the generic part, can you resend the PCI
> >> > part to the linux-pci@...r.kernel.org list for review just in case
> >> > anyone has a better idea of how to do it?
> >>
> >> Did I take the generic part?  I can't remember...
> >
> > Doesn't look like it.  Vergard can you send out an updated patch set?
>
> Actually, my patch is still just a hack, since pci_bus_type.p is still
> set before the pci_bus_type is really usable. So if the kernel crashes
> (or, in general, no_pci_devices() is called) at some point between the
> pci_bus_type.p = <something> and pci_bus_type.p = NULL (which I
> inserted), we will still see the same type of fault.
>
> So I would prefer to solve this in a different way, like a dedicated
> flag which is only set after we know that pci_bus_type initialisation
> succeeded. I think that was the approach of my first patch? I don't
> remember. In any case, such a patch could not be split in generic/pci
> parts, I think. Also, should we anticipate concurrent access to
> pci_bus_type.p or such a dedicated "no_pci_devices" flag?
>
> Here is the first patch, but I wonder if it should be turned into
> atomic_t instead: http://lkml.org/lkml/2008/12/20/33

It seems like you could do this with a driver core call?  Isn't there a way to 
check whether a given bus type is registered?  If so, we could just use that 
from no_pci_devices instead of a new flag.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
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