mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 63678: Improved the signal safety of `ns::clone`.
Date Tue, 14 Nov 2017 19:11:47 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63678/
-----------------------------------------------------------

(Updated Nov. 14, 2017, 7:11 p.m.)


Review request for mesos, Benjamin Bannier and Jie Yu.


Bugs: MESOS-8159
    https://issues.apache.org/jira/browse/MESOS-8159


Repository: mesos


Description
-------

`ns::clone` was implicitly using malloc to allocate a stack
after fork but before exec, where we should be avoiding
`malloc`.

Updated the second clone to use `os::signal_safe::clone`. We
still explicitly allocate a stack after the fork, but since
that is allocated with `mmap` is it safe in this particular
case.


Diffs (updated)
-----

  src/linux/ns.cpp 33751b518e95f4f67e6864728e1fdf621f50dd52 


Diff: https://reviews.apache.org/r/63678/diff/2/

Changes: https://reviews.apache.org/r/63678/diff/1-2/


Testing
-------

sudo make check (Fedora 26)

NOTE: I tried to avoid changing `ns::clone` too much in this patch because [MESOS-8155](https://issues.apache.org/jira/browse/MESOS-8155)
and [MESOS-8156](https://issues.apache.org/jira/browse/MESOS-8156) are also going to also
hit this code.


Thanks,

James Peach


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message