From: Hans de Goede <hdegoede@redhat.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3] fbcon: Do not takeover the console from atomic context
Date: Sat, 11 Aug 2018 10:28:43 +0000 [thread overview]
Message-ID: <be1c126d-c6cf-52d5-8f10-25fee6451f56@redhat.com> (raw)
In-Reply-To: <18266775.E32RSncY74@amdc3058>
Hi,
On 10-08-18 17:22, Bartlomiej Zolnierkiewicz wrote:
> On Friday, August 10, 2018 01:27:57 PM Hans de Goede wrote:
>> Taking over the console involves allocating mem with GFP_KERNEL, talking
>> to drm drivers, etc. So this should not be done from an atomic context.
>>
>> But the console-output trigger deferred console takeover may happen from an
>> atomic context, which leads to "BUG: sleeping function called from invalid
>> context" errors.
>>
>> This commit fixes these errors by doing the deferred takeover from a
>> workqueue.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Patch queued for 4.19, thanks.
>
>> @@ -3607,8 +3620,8 @@ static int fbcon_output_notifier(struct notifier_block *nb,
>> deferred_takeover = false;
>> logo_shown = FBCON_LOGO_DONTSHOW;
>>
>> - for_each_registered_fb(i)
>> - fbcon_fb_registered(registered_fb[i]);
>> + /* We may get called in atomic context */
>> + schedule_work(&fbcon_deferred_takeover_work);
>
> After above change gcc now complains about unused variable:
>
> drivers/video/fbdev/core/fbcon.c: In function ‘fbcon_output_notifier’:
> drivers/video/fbdev/core/fbcon.c:3613:6: warning: unused variable ‘i’ [-Wunused-variable]
> int i;
> ^
>
> I fixed this while applying the patch.
Ah yes, thank you for fixing this,
Regards,
Hans
prev parent reply other threads:[~2018-08-11 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180810112805epcas1p17ec5ad2f046683aad683edcae22777b2@epcas1p1.samsung.com>
2018-08-10 11:27 ` [PATCH v3] fbcon: Do not takeover the console from atomic context Hans de Goede
2018-08-10 15:22 ` Bartlomiej Zolnierkiewicz
2018-08-11 10:28 ` Hans de Goede [this message]
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=be1c126d-c6cf-52d5-8f10-25fee6451f56@redhat.com \
--to=hdegoede@redhat.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
/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).