From: Greg KH <gregkh@suse.de>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Milton Miller <miltonm-ogEGBHC/i9Y@public.gmane.org>,
sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Josip Rodin <joy-TwbeF3gwir6QvBXZIOnqxg@public.gmane.org>
Subject: Re: [PATCH 2/2] drivercore: revert addition of of_match to struct
Date: Wed, 18 May 2011 19:55:14 +0000 [thread overview]
Message-ID: <20110518195514.GB28653@suse.de> (raw)
In-Reply-To: <20110518192105.28986.53198.stgit@ponder>
On Wed, May 18, 2011 at 01:21:05PM -0600, Grant Likely wrote:
> 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>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@suse.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Milton Miller <miltonm@bga.com>,
sparclinux@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
David Miller <davem@davemloft.net>,
Josip Rodin <joy@entuzijast.net>
Subject: Re: [PATCH 2/2] drivercore: revert addition of of_match to struct device
Date: Wed, 18 May 2011 12:55:14 -0700 [thread overview]
Message-ID: <20110518195514.GB28653@suse.de> (raw)
In-Reply-To: <20110518192105.28986.53198.stgit@ponder>
On Wed, May 18, 2011 at 01:21:05PM -0600, Grant Likely wrote:
> 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>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh-l3A5Bk7waGM@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Milton Miller <miltonm-ogEGBHC/i9Y@public.gmane.org>,
sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Josip Rodin <joy-TwbeF3gwir6QvBXZIOnqxg@public.gmane.org>
Subject: Re: [PATCH 2/2] drivercore: revert addition of of_match to struct device
Date: Wed, 18 May 2011 12:55:14 -0700 [thread overview]
Message-ID: <20110518195514.GB28653@suse.de> (raw)
In-Reply-To: <20110518192105.28986.53198.stgit@ponder>
On Wed, May 18, 2011 at 01:21:05PM -0600, Grant Likely wrote:
> 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-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Acked-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
next prev parent reply other threads:[~2011-05-18 19:55 UTC|newest]
Thread overview: 18+ 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:20 ` Grant Likely
2011-05-18 19:20 ` Grant Likely
2011-05-18 19:21 ` [PATCH 1/2] of: fix race when matching drivers Grant Likely
2011-05-18 19:21 ` Grant Likely
2011-05-18 19:21 ` Grant Likely
2011-05-18 19:54 ` Greg KH
2011-05-18 19:54 ` Greg KH
2011-05-18 21:03 ` David Miller
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:21 ` Grant Likely
2011-05-18 19:21 ` Grant Likely
2011-05-18 19:55 ` Greg KH [this message]
2011-05-18 19:55 ` Greg KH
2011-05-18 19:55 ` Greg KH
2011-05-18 21:03 ` [PATCH 2/2] drivercore: revert addition of of_match to struct David Miller
2011-05-18 21:03 ` [PATCH 2/2] drivercore: revert addition of of_match to struct device David Miller
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=20110518195514.GB28653@suse.de \
--to=gregkh@suse.de \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=joy-TwbeF3gwir6QvBXZIOnqxg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=miltonm-ogEGBHC/i9Y@public.gmane.org \
--cc=sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.