diff options
| author | Mike Galbraith <[email protected]> | 2022-01-22 06:14:17 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2022-01-22 06:33:37 +0000 |
| commit | a37265995c867a4e413761d846cef0445b08d6d5 (patch) | |
| tree | 994b5c69c3d69573702b62d045868f235b75ace5 /fs/proc/generic.c | |
| parent | zsmalloc: replace per zpage lock with pool->migrate_lock (diff) | |
| download | kernel-a37265995c867a4e413761d846cef0445b08d6d5.tar.gz kernel-a37265995c867a4e413761d846cef0445b08d6d5.zip | |
zsmalloc: replace get_cpu_var with local_lock
The usage of get_cpu_var() in zs_map_object() is problematic because it
disables preemption and makes it impossible to acquire any sleeping lock
on PREEMPT_RT such as a spinlock_t.
Replace the get_cpu_var() usage with a local_lock_t which is embedded
struct mapping_area. It ensures that the access the struct is
synchronized against all users on the same CPU.
[minchan: remove the bit_spin_lock part and change the title]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Mike Galbraith <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Minchan Kim <[email protected]>
Tested-by: Sebastian Andrzej Siewior <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/generic.c')
0 files changed, 0 insertions, 0 deletions
