From: John Ogness <john.ogness@linutronix.de>
To: Sebastian Siewior <bigeasy@linutronix.de>,
Jiri Kosina <jikos@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: fb-helper: Avoid nesting spinlock_t into raw_spinlock_t
Date: Tue, 15 Feb 2022 17:29:27 +0106 [thread overview]
Message-ID: <87o8382j5s.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <YgvLdvPihuQ9KZ6/@linutronix.de>
On 2022-02-15, Sebastian Siewior <bigeasy@linutronix.de> wrote:
>> From: Jiri Kosina <jkosina@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
next prev parent reply other threads:[~2022-02-15 16:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 15:43 [PATCH] drm: fb-helper: Avoid nesting spinlock_t into raw_spinlock_t Jiri Kosina
2022-02-15 15:49 ` Sebastian Siewior
2022-02-15 16:23 ` John Ogness [this message]
2022-02-15 19:59 ` Jiri Kosina
2022-02-16 7:40 ` Sebastian Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8382j5s.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=airlied@linux.ie \
--cc=bigeasy@linutronix.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jikos@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).