Commit 8ec02ea
nsexec: retry unshare on EINVAL
Older kernels may return EINVAL on unshare when a process is reading
runc's /proc/$PID/status or /proc/$PID/maps. This was fixed by kernel
commit 12c641ab8270f ("unshare: Unsharing a thread does not require
unsharing a vm") in Linux v4.3.
For CentOS 7, the fix was backported to CentOS 7.7 (kernel 3.10.0-1062).
To work around this kernel bug, let's retry on EINVAL a few times.
Reported-by: zzyyzte <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit cecb039)
Signed-off-by: Kir Kolyshkin <[email protected]>1 parent 059d773 commit 8ec02ea
1 file changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
835 | 854 | | |
836 | 855 | | |
837 | 856 | | |
| |||
1170 | 1189 | | |
1171 | 1190 | | |
1172 | 1191 | | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
| 1192 | + | |
1176 | 1193 | | |
1177 | 1194 | | |
1178 | 1195 | | |
| |||
1224 | 1241 | | |
1225 | 1242 | | |
1226 | 1243 | | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
| 1244 | + | |
1230 | 1245 | | |
1231 | 1246 | | |
1232 | 1247 | | |
| |||
1344 | 1359 | | |
1345 | 1360 | | |
1346 | 1361 | | |
1347 | | - | |
1348 | | - | |
| 1362 | + | |
1349 | 1363 | | |
1350 | 1364 | | |
1351 | 1365 | | |
| |||
0 commit comments