public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Christoph Hellwig <hch@infradead.org>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PC300 update
Date: Thu, 29 Jan 2004 13:02:51 +0000	[thread overview]
Message-ID: <20040129130251.A23935@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20040129090222.A20867@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Thu, Jan 29, 2004 at 09:02:22AM +0000

On Thu, Jan 29, 2004 at 09:02:22AM +0000, Russell King wrote:
> If _any_ PCI ID table which is part registered as part of a driver is
> marked using __devinitdata or __initdata, this will either cause the
> kernel to read invalid data (possibly entering a long loop) or oops.

After doing some more digging, I don't think __devinitdata is a problem
anymore.

There seem to be two scenarios where we look at the PCI device ID tables:

- when a new PCI device is added
- when the drivers newid file is written to

The first case should only ever occur if CONFIG_HOTPLUG is set (and
indeed we only compile PCMCIA/Cardbus if it is.)

The second case is disabled if CONFIG_HOTPLUG is not set.

Therefore, I think marking PCI device ID tables with __devinitdata
should theoretically be fine, but marking them with __initdata is
most definitely unsafe.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

  reply	other threads:[~2004-01-29 13:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-28 19:42 [PATCH] PC300 update Marcelo Tosatti
2004-01-28 21:21 ` Christoph Hellwig
2004-01-29  0:06   ` Marcelo Tosatti
2004-01-29  8:16     ` Christoph Hellwig
2004-01-29  9:02     ` Russell King
2004-01-29 13:02       ` Russell King [this message]
2004-01-28 21:43 ` Greg KH
2004-01-29  0:02   ` Marcelo Tosatti
  -- strict thread matches above, loose matches on Subject: below --
2004-01-30 17:52 Marcelo Tosatti

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=20040129130251.A23935@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=torvalds@osdl.org \
    /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