Commit 394c2205 by Stéphane Graber Committed by GitHub

Merge pull request #1548 from brauner/2017-05-10/prevent_umount_propagation

utils: handle > 2^31 in lxc_unstack_mountpoint()
parents 60883ba8 b4a40f7b
...@@ -2221,10 +2221,15 @@ pop_stack: ...@@ -2221,10 +2221,15 @@ pop_stack:
if (errno != EINVAL) if (errno != EINVAL)
return -errno; return -errno;
} else { } else {
/* Just stop counting when this happens. That'd just be so
* stupid that we won't even bother trying to report back the
* correct value anymore.
*/
if (umounts != INT_MAX)
umounts++;
/* We succeeded in umounting. Make sure that there's no other /* We succeeded in umounting. Make sure that there's no other
* mountpoint stacked underneath. * mountpoint stacked underneath.
*/ */
umounts++;
goto pop_stack; goto pop_stack;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment