From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Julia Cartwright <julia@ni.com>,
Daniel Wagner <daniel.wagner@siemens.com>,
tom.zanussi@linux.intel.com, Alex Shi <alex.shi@linaro.org>,
stable-rt@vger.kernel.org, Mike Galbraith <efault@gmx.de>
Subject: [PATCH RT 1/4] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code
Date: Tue, 21 Nov 2017 11:04:43 -0500 [thread overview]
Message-ID: <20171121160517.195093772@goodmis.org> (raw)
In-Reply-To: 20171121160442.866038796@goodmis.org
[-- Attachment #1: 0001-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch --]
[-- Type: text/plain, Size: 1340 bytes --]
4.9.61-rt52-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Mike Galbraith <efault@gmx.de>
Use get_local_ptr() instead this_cpu_ptr() to avoid a warning regarding
smp_processor_id() in preemptible code.
raw_cpu_ptr() would be fine, too because the per-CPU data structure is
protected with a spin lock so it does not matter much if we take the
other one.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
drivers/block/zram/zcomp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
index fa8329ad79fd..8c93ee150ee8 100644
--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -120,7 +120,7 @@ struct zcomp_strm *zcomp_stream_get(struct zcomp *comp)
{
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,
--
2.13.2
next prev parent reply other threads:[~2017-11-21 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 16:04 [PATCH RT 0/4] Linux 4.9.61-rt52-rc1 Steven Rostedt
2017-11-21 16:04 ` Steven Rostedt [this message]
2017-11-21 16:04 ` [PATCH RT 2/4] fs/dcache: disable preemption on i_dir_seqs write side Steven Rostedt
2017-11-21 16:04 ` [PATCH RT 3/4] tpm_tis: fix stall after iowrite*()s Steven Rostedt
2017-11-21 16:04 ` [PATCH RT 4/4] Linux 4.9.61-rt52-rc1 Steven Rostedt
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=20171121160517.195093772@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=alex.shi@linaro.org \
--cc=bigeasy@linutronix.de \
--cc=daniel.wagner@siemens.com \
--cc=efault@gmx.de \
--cc=jkacur@redhat.com \
--cc=julia@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tom.zanussi@linux.intel.com \
/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).