diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-04-21 23:28:38 +0206 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-04-22 21:30:57 +0200 |
commit | 1f5d783094cf28b4905f51cad846eb5d1db6673e (patch) | |
tree | 6278632b36d62cc5097d0eb8bc9ebd942294453d /tools/perf/scripts/python/intel-pt-events.py | |
parent | f5343321b71ac0a1112adeab0ff90b239bad3a83 (diff) |
printk: add missing memory barrier to wake_up_klogd()
It is important that any new records are visible to preparing
waiters before the waker checks if the wait queue is empty.
Otherwise it is possible that:
- there are new records available
- the waker sees an empty wait queue and does not wake
- the preparing waiter sees no new records and begins to wait
This is exactly the problem that the function description of
waitqueue_active() warns about.
Use wq_has_sleeper() instead of waitqueue_active() because it
includes the necessary full memory barrier.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220421212250.565456-4-john.ogness@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions