public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code
Date: Wed, 23 Aug 2017 11:57:29 +0200	[thread overview]
Message-ID: <1503482249.4970.7.camel@gmx.de> (raw)
In-Reply-To: <20170818120939.b2rj2whb2hgfzjpm@linutronix.de>


Use get_local_ptr() vs this_cpu_ptr().

Signed-off-by: Mike Galbraith <efault@gmx.de>
---
 drivers/block/zram/zcomp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -120,7 +120,7 @@ struct zcomp_strm *zcomp_stream_get(stru
 {
 	struct zcomp_strm *zstrm;
 
-	zstrm = *this_cpu_ptr(comp->stream);
+	zstrm = *get_local_ptr(comp->stream);
 	spin_lock(&zstrm->zcomp_lock);
 	return zstrm;
 }
@@ -131,6 +131,7 @@ void zcomp_stream_put(struct zcomp *comp
 
 	zstrm = *this_cpu_ptr(comp->stream);
 	spin_unlock(&zstrm->zcomp_lock);
+	put_local_ptr(zstrm);
 }
 
 int zcomp_compress(struct zcomp_strm *zstrm,

  parent reply	other threads:[~2017-08-23  9:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 12:09 [ANNOUNCE] v4.11.12-rt10 Sebastian Andrzej Siewior
2017-08-23  9:53 ` v4.11.12-rt10 - hotplug lockdep splat Mike Galbraith
2017-08-31 16:18   ` Sebastian Andrzej Siewior
2017-09-02  7:00     ` Mike Galbraith
2017-09-03  2:48     ` Mike Galbraith
2017-09-04 14:58       ` Sebastian Andrzej Siewior
2017-08-23  9:57 ` Mike Galbraith [this message]
2017-08-31 15:48   ` [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code Sebastian Andrzej Siewior
2017-08-31 19:11   ` Thomas Gleixner
2017-08-31 19:26     ` Sebastian Andrzej Siewior
2017-08-31 19:32       ` Thomas Gleixner
2017-09-01  7:40         ` Sebastian Andrzej Siewior
2017-09-01  7:47           ` Thomas Gleixner

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=1503482249.4970.7.camel@gmx.de \
    --to=efault@gmx.de \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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