Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718197
| From | Mike Galbraith <efault@gmx.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code |
| Date | 2017-08-23 12:00 +0200 |
| Message-ID | <uhAC7-7kw-17@gated-at.bofh.it> (permalink) |
| References | <ufOg9-3uF-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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,
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[ANNOUNCE] v4.11.12-rt10 Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-08-18 14:10 +0200 v4.11.12-rt10 - hotplug lockdep splat Mike Galbraith <efault@gmx.de> - 2017-08-23 12:00 +0200 [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code Mike Galbraith <efault@gmx.de> - 2017-08-23 12:00 +0200
csiph-web