linux-uconsole/kernel/locking
Suren Baghdasaryan 2fc2c66b9c ANDROID: percpu-rwsem: enable percpu_sem destruction in atomic context
Calling percpu_free_rwsem in atomic context results in "scheduling while
atomic" bug being triggered:

BUG: scheduling while atomic: klogd/158/0x00000002
...
  __schedule_bug+0x191/0x290
  schedule_debug+0x97/0x180
  __schedule+0xdc/0xba0
  schedule+0xda/0x250
  schedule_timeout+0x92/0x2d0
  __wait_for_common+0x25b/0x430
  wait_for_completion+0x1f/0x30
  rcu_barrier+0x440/0x4f0
  rcu_sync_dtor+0xaa/0x190
  percpu_free_rwsem+0x41/0x80

Introduce percpu_rwsem_destroy function to perform semaphore destruction
in a worker thread.

Bug: 161210518
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I74ac65c2a9962492cd5002d7a019d2aa13a21a8c
2021-12-15 21:44:50 +00:00
..
lock_events.c
lock_events.h
lock_events_list.h
lockdep.c locking/lockdep: Mark local_lock_t 2021-09-15 09:50:41 +02:00
lockdep_internals.h lockdep: Fix usage_traceoverflow 2020-10-09 08:53:08 +02:00
lockdep_proc.c
lockdep_states.h
locktorture.c locktorture: Make function torture_percpu_rwsem_init() static 2020-08-24 18:45:32 -07:00
Makefile
mcs_spinlock.h
mutex-debug.c locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal 2021-05-26 12:06:50 +02:00
mutex-debug.h locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal 2021-05-26 12:06:50 +02:00
mutex.c This is the 5.10.65 stable release 2021-09-15 14:16:47 +02:00
mutex.h locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal 2021-05-26 12:06:50 +02:00
osq_lock.c
percpu-rwsem.c ANDROID: percpu-rwsem: enable percpu_sem destruction in atomic context 2021-12-15 21:44:50 +00:00
qrwlock.c locking/qrwlock: Fix ordering in queued_write_lock_slowpath() 2021-04-28 13:40:00 +02:00
qspinlock.c
qspinlock_paravirt.h
qspinlock_stat.h
rtmutex-debug.c
rtmutex-debug.h
rtmutex.c ANDROID: vendor_hooks: set debugging data when rt_mutex is working 2021-05-07 00:12:54 +00:00
rtmutex.h
rtmutex_common.h rtmutex: Remove unused argument from rt_mutex_proxy_unlock() 2021-01-30 13:55:17 +01:00
rwsem.c ANDROID: locking/rwsem: only clean RWSEM_FLAG_HANDOFF when already set 2021-11-16 18:07:21 +00:00
rwsem.h
semaphore.c
spinlock.c
spinlock_debug.c
test-ww_mutex.c