devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: grant.likely@secretlab.ca
Cc: devicetree-discuss@lists.ozlabs.org, gregkh@suse.de,
	linux-kernel@vger.kernel.org, miltonm@bga.com,
	sparclinux@vger.kernel.org, torvalds@linux-foundation.org,
	joy@entuzijast.net
Subject: Re: [PATCH 2/2] drivercore: revert addition of of_match to struct device
Date: Wed, 18 May 2011 17:03:52 -0400 (EDT)	[thread overview]
Message-ID: <20110518.170352.92788672093555496.davem@davemloft.net> (raw)
In-Reply-To: <20110518192105.28986.53198.stgit@ponder>

From: Grant Likely <grant.likely@secretlab.ca>
Date: Wed, 18 May 2011 13:21:05 -0600

> Commit b826291c, "drivercore/dt: add a match table pointer to struct
> device" added an of_match pointer to struct device to cache the
> of_match_table entry discovered at driver match time.  This was unsafe
> because matching is not an atomic operation with probing a driver.  If
> two or more drivers are attempted to be matched to a driver at the
> same time, then the cached matching entry pointer could get
> overwritten.
> 
> This patch reverts the of_match cache pointer and reworks all users to
> call of_match_device() directly instead.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

Tested on SunBlade2500 and Niagara2+

Acked-by: David S. Miller <davem@davemloft.net>

      parent reply	other threads:[~2011-05-18 21:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 19:20 [git pull][PATCH 0/2] Fix regression caused by addition of 'of_match' Grant Likely
2011-05-18 19:21 ` [PATCH 1/2] of: fix race when matching drivers Grant Likely
2011-05-18 19:54   ` Greg KH
2011-05-18 21:03   ` David Miller
2011-05-18 19:21 ` [PATCH 2/2] drivercore: revert addition of of_match to struct device Grant Likely
2011-05-18 19:55   ` Greg KH
2011-05-18 21:03   ` David Miller [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=20110518.170352.92788672093555496.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@suse.de \
    --cc=joy@entuzijast.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).