summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch')
-rw-r--r--debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch b/debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch
new file mode 100644
index 000000000..0ff366338
--- /dev/null
+++ b/debian/patches-rt/0248-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch
@@ -0,0 +1,44 @@
+From 6b94039830863cbed6f161843e96e0cd79637353 Mon Sep 17 00:00:00 2001
+From: Mike Galbraith <efault@gmx.de>
+Date: Wed, 23 Aug 2017 11:57:29 +0200
+Subject: [PATCH 248/347] drivers/zram: fix zcomp_stream_get()
+ smp_processor_id() use in preemptible code
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+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>
+---
+ 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 dd65a27ae2cc..eece02262000 100644
+--- a/drivers/block/zram/zcomp.c
++++ b/drivers/block/zram/zcomp.c
+@@ -118,7 +118,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;
+ }
+@@ -129,6 +129,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.36.1
+