Created
October 31, 2020 01:09
-
-
Save joanbm/0e22c5ac62c803bc03e104b2bf3a3578 to your computer and use it in GitHub Desktop.
Workaround for LXC 4.0.5 for Linux 5.10-rc1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 77d66033cb0f497a217b7756f5e61de0f5e461ba Mon Sep 17 00:00:00 2001 | |
From: Joan Bruguera <joanbrugueram@gmail.com> | |
Date: Fri, 30 Oct 2020 07:19:10 +0100 | |
Subject: [PATCH] Workaround for LXC 4.0.5 for Linux 5.10-rc1 | |
Fixes launching a container like: sudo -i lxc-start -n talpine -F | |
Resulting in the error message: lxc-start: talpine: conf.c: turn_into_dependent_mounts: 3012 Invalid argument - Failed to copy "/proc/self/mountinfo" | |
Breaking commit in Linux: 36e2c7421f02a22f71c9283e55fdb672a9eb58e7 | |
Associated bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209971 | |
--- | |
src/lxc/conf.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/src/lxc/conf.c b/src/lxc/conf.c | |
index 2a277d0..e13deaa 100644 | |
--- a/src/lxc/conf.c | |
+++ b/src/lxc/conf.c | |
@@ -3004,7 +3004,7 @@ void turn_into_dependent_mounts(void) | |
} | |
again: | |
- copied = lxc_sendfile_nointr(memfd, mntinfo_fd, NULL, LXC_SENDFILE_MAX); | |
+ copied = fd_to_fd(mntinfo_fd, memfd); | |
if (copied < 0) { | |
if (errno == EINTR) | |
goto again; | |
-- | |
2.29.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment