[PATCH] drm: fb-helper: Avoid nesting spinlock_t into raw_spinlock_t
John Ogness
john.ogness at linutronix.de
Tue Feb 15 16:23:27 UTC 2022
On 2022-02-15, Sebastian Siewior <bigeasy at linutronix.de> wrote:
>> From: Jiri Kosina <jkosina at suse.cz>
>>
>> drm_fb_helper_damage() is acquiring spinlock_t (helper->damage_lock),
>> while it can be called from contexts where raw_spinlock_t is held (e.g.
>> console_owner lock obtained on vprintk_emit() codepath).
>>
>> As the critical sections protected by damage_lock are super-tiny, let's
>> fix this by converting it to raw_spinlock_t in order not to violate
>> PREEMPT_RT-imposed lock nesting rules.
>>
>> This fixes the splat below.
>>
>> =============================
>> [ BUG: Invalid wait context ]
>> 5.17.0-rc4-00002-gd567f5db412e #1 Not tainted
>
> rc4. Is this also the case in the RT tree which includes John's printk
> changes?
In the RT tree, the fbcon's write() callback is only called in
preemptible() contexts. So this is only a mainline issue.
The series I recently posted to LKML [0] should also address this issue
(if/when it gets accepted).
John
[0] https://lore.kernel.org/lkml/20220207194323.273637-1-john.ogness@linutronix.de
More information about the dri-devel
mailing list