9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] [PATCH] private /srv attach option
Date: Wed, 22 Jun 2022 17:22:48 +0200	[thread overview]
Message-ID: <388F566ADE20BEF9E93A334BCFEA644D@felloff.net> (raw)
In-Reply-To: <27178dc6-eefd-7b5a-c243-467331d31e10@posixcafe.org>

small bugs.

readstr() can error, so you need to put a waserror() to do
the runlock(b).

i'm a bit confused about the boardclunk().

as i see it, the original Board *b would never be unlocked
if the loop condition was true.

as the loop at the bottom changes b to the parent.

then the final wunlock() at the bottom would unlock the
wrong thing?

also, the lock order seems strange. we'r here locking from
the bottom up to the root.

as long as we always lock from the bottom to up, we'r
fine, but if we have any case where we acquired parent
lock, and then try to aquire a child lock we have
a lock order violation that can lead to deadlock.

sorry, didnt have time before to code review.


  reply	other threads:[~2022-06-22 15:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 11:50 Jacob Moody
2022-05-30 14:44 ` ori
2022-05-30 17:26   ` Jacob Moody
2022-05-30 20:04     ` ori
2022-05-31  7:03       ` hiro
2022-05-31 15:09         ` Jacob Moody
2022-05-31 16:04           ` Jacob Moody
2022-06-08 14:48             ` Jacob Moody
2022-06-22 15:22               ` cinap_lenrek [this message]
2022-05-30 14:56 ` ori
2022-07-10 21:47 ` ori

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=388F566ADE20BEF9E93A334BCFEA644D@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \


* 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).