From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from duke.felloff.net ([216.126.196.34]) by ewsd; Tue Apr 7 03:26:33 EDT 2020 Message-ID: Date: Tue, 7 Apr 2020 09:26:21 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org Subject: Re: [9front] Re: kernel: postnote patch In-Reply-To: <9B554438AD964E6B5188F97FD3FCD580@gmail.com> 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: compliant ORM over XMPP browser event > Here is a new version of the patch that checks the length of the note > string BEFORE aquiring the p->debug lock if dolock is set (thanks > kvik). > > diff -r 8c47f4302b74 sys/src/9/port/proc.c > --- a/sys/src/9/port/proc.c Sun Apr 05 23:26:52 2020 +0930 > +++ b /sys/src/9/port/proc.c Mon Apr 06 08:48:52 2020 -0500 > @@ -894,6 +894,9 @@ > if(p == nil) > return 0; > > + if(strlen(n) == 0) > + return 0; > + > if(dolock) > qlock(&p->debug); why? we had no constraint on the note contents before. what is this supposed to fix? -- cinap