public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Johannes Berg <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, paulmck@linux.vnet.ibm.com,
	mingo@kernel.org, tglx@linutronix.de, chris@chris-wilson.co.uk,
	akpm@linux-foundation.org, hpa@zytor.com,
	johannes.berg@intel.com, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, daniel.vetter@ffwll.ch
Subject: [tip:locking/core] Revert "drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference"
Date: Thu, 18 Aug 2016 03:59:35 -0700	[thread overview]
Message-ID: <tip-8180cfb96098f7066fbd0a44ac3aaf422f74609d@git.kernel.org> (raw)
In-Reply-To: <1470909022-687-1-git-send-email-johannes@sipsolutions.net>

Commit-ID:  8180cfb96098f7066fbd0a44ac3aaf422f74609d
Gitweb:     http://git.kernel.org/tip/8180cfb96098f7066fbd0a44ac3aaf422f74609d
Author:     Johannes Berg <johannes.berg@intel.com>
AuthorDate: Thu, 11 Aug 2016 11:50:21 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 18 Aug 2016 11:34:26 +0200

Revert "drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference"

This reverts commit:

  fa7d81bb3c269 ("drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference")

As Peter explained:

  [...] lockless_dereference() is _stronger_ than READ_ONCE(), not weaker.

  [...]

  Also, clue is in the name: 'dereference', you don't actually dereference
  the pointer here, only load it.

My next patch breaks the compile without this revert, because it assumes
you want to deference and thus also need the struct type visible (which
it isn't here), so revert it.

Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1470909022-687-1-git-send-email-johannes@sipsolutions.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/gpu/drm/drm_fb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index ce54e98..0a06f91 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -464,7 +464,7 @@ static bool drm_fb_helper_is_bound(struct drm_fb_helper *fb_helper)
 
 	/* Sometimes user space wants everything disabled, so don't steal the
 	 * display if there's a master. */
-	if (lockless_dereference(dev->master))
+	if (READ_ONCE(dev->master))
 		return false;
 
 	drm_for_each_crtc(crtc, dev) {

  parent reply	other threads:[~2016-08-18 11:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11  9:50 [PATCH 1/2] Revert "drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference" Johannes Berg
2016-08-11  9:50 ` [PATCH 2/2] locking/barriers: suppress sparse warnings in lockless_dereference() Johannes Berg
2016-08-18 11:00   ` [tip:locking/core] locking/barriers: Suppress " tip-bot for Johannes Berg
2016-08-18 13:40   ` [tip:locking/urgent] " tip-bot for Johannes Berg
2016-08-11 10:38 ` [PATCH 1/2] Revert "drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference" Daniel Vetter
2016-08-11 18:26   ` Paul E. McKenney
2016-08-12  6:05     ` Johannes Berg
2016-08-12 18:25     ` Peter Zijlstra
2016-08-12 19:15       ` Paul E. McKenney
2016-08-18 10:59 ` tip-bot for Johannes Berg [this message]
2016-08-18 13:40 ` [tip:locking/urgent] " tip-bot for Johannes Berg

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=tip-8180cfb96098f7066fbd0a44ac3aaf422f74609d@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=hpa@zytor.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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