From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] Kernel memory leak
Date: Sun, 23 Aug 2020 03:20:22 +0200 [thread overview]
Message-ID: <1C00BF7104B27D40F5297717986A81AD@felloff.net> (raw)
In-Reply-To: <65DEAD1E639AB624F6FBBC11D8EEDD17@musolino.id.au>
very good catch.
i think the cunique() would *ALWAYS* be required when we are going
to stuff something on the chan's umh, as otherwise we'd have a race
condition because the returned chan from domount() -> findmount()
is shared.
alternatively, we could probably get rid of Abind mode completely,
and just have cmount() do the mounthead lookup itself instead of
using new->umh.
but for now, i think the best would be to do it like this:
switch(amode){
case Abind:
/* no need to maintain path - cannot dotdot an Abind */
m = nil;
if(!nomount)
domount(&c, &m, nil);
+ c = cunique(c);
+ if(c->umh != nil){ //BUG
+ print("bind umh\n");
+ putmhead(c->umh);
+ }
- putmhead(c->umh);
c->umh = m;
break;
can you check if this works?
--
cinap
next prev parent reply other threads:[~2020-08-23 1:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 15:40 Alex Musolino
2020-08-23 1:20 ` cinap_lenrek [this message]
2020-08-23 2:36 ` [9front] " Alex Musolino
2020-08-23 3:07 ` cinap_lenrek
2020-08-23 3:16 ` Alex Musolino
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=1C00BF7104B27D40F5297717986A81AD@felloff.net \
--to=cinap_lenrek@felloff.net \
--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).