Commit 6fd2fe4
copy_process(): don't use ksys_close() on cleanups
anon_inode_getfd() should be used *ONLY* in situations when we are
guaranteed to be past the last failure point (including copying the
descriptor number to userland, at that). And ksys_close() should
not be used for cleanups at all.
anon_inode_getfile() is there for all nontrivial cases like that.
Just use that...
Fixes: b3e5838 ("clone: add CLONE_PIDFD")
Signed-off-by: Al Viro <[email protected]>
Reviewed-by: Jann Horn <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>1 parent bee19cd commit 6fd2fe4
1 file changed
+18
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1712 | 1712 | | |
1713 | 1713 | | |
1714 | 1714 | | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | 1715 | | |
1741 | 1716 | | |
1742 | 1717 | | |
| |||
1774 | 1749 | | |
1775 | 1750 | | |
1776 | 1751 | | |
| 1752 | + | |
1777 | 1753 | | |
1778 | 1754 | | |
1779 | 1755 | | |
| |||
2046 | 2022 | | |
2047 | 2023 | | |
2048 | 2024 | | |
2049 | | - | |
| 2025 | + | |
2050 | 2026 | | |
2051 | 2027 | | |
2052 | 2028 | | |
2053 | 2029 | | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
2054 | 2039 | | |
2055 | 2040 | | |
2056 | 2041 | | |
| |||
2168 | 2153 | | |
2169 | 2154 | | |
2170 | 2155 | | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
2171 | 2159 | | |
2172 | 2160 | | |
2173 | 2161 | | |
| |||
2234 | 2222 | | |
2235 | 2223 | | |
2236 | 2224 | | |
2237 | | - | |
2238 | | - | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
2239 | 2229 | | |
2240 | 2230 | | |
2241 | 2231 | | |
| |||
0 commit comments