public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] kernel: locking: a possible sleep-in-atomic-context bug in rt_mutex_slowlock()
@ 2018-06-21  3:14 Jia-Ju Bai
  2018-06-21  7:36 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Jia-Ju Bai @ 2018-06-21  3:14 UTC (permalink / raw)
  To: peterz, mingo; +Cc: Linux Kernel Mailing List

The kernel may sleep with holding a spinlock.
The function call path (from bottom to top) in Linux-4.16.7 is:

[FUNC] schedule
kernel/locking/rtmutex.c, 1223: schedule in rt_mutex_handle_deadlock
kernel/locking/rtmutex.c, 1273: rt_mutex_handle_deadlock in 
rt_mutex_slowlock
kernel/locking/rtmutex.c, 1249: _raw_spin_lock_irqsave in rt_mutex_slowlock

This bug is found by my static analysis tool (DSAC-2) and checked by my
code review.

I do not know how to correctly fix this bug, so I just report them.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-21  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21  3:14 [BUG] kernel: locking: a possible sleep-in-atomic-context bug in rt_mutex_slowlock() Jia-Ju Bai
2018-06-21  7:36 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox