From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18709 invoked from network); 17 Aug 2022 12:19:20 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 17 Aug 2022 12:19:20 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 9front; Wed Aug 17 08:18:09 -0400 2022 Received: from abbatoir.myfiosgateway.com (pool-74-108-56-137.nycmny.fios.verizon.net [74.108.56.137]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id fad26999 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Wed, 17 Aug 2022 05:17:58 -0700 (PDT) Message-ID: To: 9front@9front.org Date: Wed, 17 Aug 2022 08:17:56 -0400 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: proxy-oriented base full-stack replication Subject: Re: [9front] fix race condition on writes to #v/vgactl Reply-To: 9front@9front.org Precedence: bulk Quoth qwx@sciops.net: > case CMdrawinit: > - if(scr->gscreen == nil) > + canqlock(&drawlock); > + if(scr->gscreen == nil){ > + qunlock(&drawlock); > error(Enoscreen); > + } this canqlock without an if looks supsicious to me; if someone else holds the lock, the canqlock fails, but that means we unlock *someone elses* lock.