mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: "Greg KH" <gregkh@suse.de>,
	"Pekka Enberg" <penberg@cs.helsinki.fi>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pci: fix no_pci_devices() #2
Date: Tue, 27 Jan 2009 10:41:52 -0800	[thread overview]
Message-ID: <200901271041.53046.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <19f34abd0901161121j2f5a21b5g2a73036dc20766ad@mail.gmail.com>

On Friday, January 16, 2009 11:21 am Vegard Nossum wrote:
> On Fri, Jan 16, 2009 at 7:41 PM, Jesse Barnes <jbarnes@virtuousgeek.org> 
wrote:
> >> > Assuming Greg already took the generic part, can you resend the PCI
> >> > part to the linux-pci@vger.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

      reply	other threads:[~2009-01-27 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 22:06 v2.6.28-rc7: error in panic code? (NULL pointer dereference at 0000004c) Vegard Nossum
2008-12-19 17:19 ` Vegard Nossum
2008-12-19 17:39   ` Greg KH
2008-12-19 20:35     ` Pekka Enberg
2008-12-20  0:46       ` Greg KH
2008-12-20  8:52         ` Vegard Nossum
2008-12-20  8:58           ` Greg KH
2008-12-20 10:56             ` [PATCH] pci: fix no_pci_devices() Vegard Nossum
2008-12-20 11:14               ` [PATCH] pci: fix no_pci_devices() #2 Vegard Nossum
2008-12-20 23:31                 ` Greg KH
2009-01-05 19:09                 ` Jesse Barnes
2009-01-07  0:42                   ` Greg KH
2009-01-16 18:41                     ` Jesse Barnes
2009-01-16 19:21                       ` Vegard Nossum
2009-01-27 18:41                         ` Jesse Barnes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901271041.53046.jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome