From: Jacob Moody <moody@mail.posixcafe.org>
To: 9front@9front.org
Subject: Re: [9front] fix race condition on writes to #v/vgactl
Date: Tue, 16 Aug 2022 14:51:50 -0600 [thread overview]
Message-ID: <eaf696a0-a2cc-35bb-16ad-a46f9537fda3@posixcafe.org> (raw)
In-Reply-To: <E9ABB2B557B7868E845353FD9049ECAC@wopr.sciops.net>
On 8/16/22 14:44, qwx@sciops.net wrote:
> On Tue Aug 16 08:12:41 +0200 2022, qwx@sciops.net wrote:
>> Hello,
>>
>> I've been experiencing a seemingly impossible kernel panic when
>> messing with vgactl. Occasionally, writing multiple commands to
>> /dev/vgactl rapidly may cause an assert to fail
>> (/sys/src/9/port/devdraw.c:/assert). The panic is perfectly
>> reproducible by sending `softscreen off' commands quickly (tested on
>> x61t):
>>
>> ; for(i in `{seq 10}) echo softscreen off >/dev/vgactl
>>
>> The panic occurs within the first few iterations. Moving some locks
>> out of individual functions to hold them for the entire step fixes
>> this. The patch below works, but qunlock may be called without the
>> drawlock being held, I need to recheck and clean up before commiting
>> anything. Credit to moody for suggesting looking in this direction!
>
> Here's the final patch, mostly the same. I'll commit this later
> unless there are any objections.
>
> Thanks,
> qwx
>
Checks out to me.
next prev parent reply other threads:[~2022-08-16 20:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 6:12 qwx
2022-08-16 20:44 ` qwx
2022-08-16 20:51 ` Jacob Moody [this message]
2022-08-16 23:02 ` Anthony Martin
2022-08-17 12:10 ` qwx
2022-08-17 12:17 ` ori
2022-08-17 20:21 ` qwx
2022-08-18 2:23 ` ori
2022-08-18 5:36 ` qwx
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=eaf696a0-a2cc-35bb-16ad-a46f9537fda3@posixcafe.org \
--to=moody@mail.posixcafe.org \
--cc=9front@9front.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).