From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 2/3] lib: rename ltp_clone_malloc to ltp_clone_alloc
Date: Fri, 14 Jun 2019 17:24:28 +0200 [thread overview]
Message-ID: <20190614152428.GA12655@rei.lan> (raw)
In-Reply-To: <CAEemH2e7yfW3fd2kRFh-6tq8Y+sZeBvSB4Eu4JN6Htdo4_=K5g@mail.gmail.com>
Hi!
> > Well, we can free the memory in ltp_clone_alloc() if the child runs in a
> > separate memory space, but if CLONE_VM was passed in flags there is no
> > way how to free the memory...
> >
>
> A stupid way come up to my mind is just to export the stack as global
> pointer and releasing in do_cleanup() if possible.
This only works if you call the function only once, if you clone two or
more you end up in the very same situation as before.
Also we will have to figure out similar problem as a part of
https://github.com/linux-test-project/ltp/issues/531 anyways, so I
wouldn't bother at this point.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-06-14 15:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 7:23 [LTP] [PATCH v3 1/3] lib: add ltp_alloc_stack() Jan Stancek
2019-06-13 7:24 ` [LTP] [PATCH v3 2/3] lib: rename ltp_clone_malloc to ltp_clone_alloc Jan Stancek
2019-06-13 8:55 ` Li Wang
2019-06-13 13:57 ` Cyril Hrubis
2019-06-14 2:46 ` Li Wang
2019-06-14 15:24 ` Cyril Hrubis [this message]
2019-06-13 7:24 ` [LTP] [PATCH v3 3/3] syscalls/ioctl_ns0[156]: align stack and wait for child Jan Stancek
2019-06-13 8:25 ` Li Wang
2019-06-13 10:16 ` Jan Stancek
2019-06-13 11:26 ` Li Wang
2019-06-13 14:17 ` Cyril Hrubis
2019-06-13 14:57 ` Jan Stancek
2019-06-13 15:14 ` Cyril Hrubis
2019-06-16 7:34 ` Jan Stancek
2019-06-17 8:50 ` Cyril Hrubis
2019-06-17 14:38 ` Jan Stancek
2019-06-18 16:00 ` Amir Goldstein
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=20190614152428.GA12655@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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