From 1bf8ef6b393997739cd26d42c7f5d8ffaf6c7402 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Mon, 15 Feb 2010 22:44:17 +0000 Subject: [PATCH] fix vcontext: pivot_root(): Invalid argument errors while creating a guest with f12 --- delta-pivot-fix01.diff | 16 ++++++++++++++++ kernel-2.6.spec | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 delta-pivot-fix01.diff diff --git a/delta-pivot-fix01.diff b/delta-pivot-fix01.diff new file mode 100644 index 000000000..38216c361 --- /dev/null +++ b/delta-pivot-fix01.diff @@ -0,0 +1,16 @@ +diff -NurpP --minimal linux-2.6.29-vs2.3.0.36.9-pre4/fs/namespace.c linux-2.6.29-vs2.3.0.36.9-pre5/fs/namespace.c +--- linux-2.6.29-vs2.3.0.36.9-pre4/fs/namespace.c 2009-03-24 14:48:35.000000000 +0100 ++++ linux-2.6.29-vs2.3.0.36.9-pre5/fs/namespace.c 2009-04-10 23:15:11.000000000 +0200 +@@ -2278,9 +2278,10 @@ SYSCALL_DEFINE2(pivot_root, const char _ + down_write(&namespace_sem); + mutex_lock(&old.dentry->d_inode->i_mutex); + error = -EINVAL; +- if (IS_MNT_SHARED(old.mnt) || ++ if ((IS_MNT_SHARED(old.mnt) || + IS_MNT_SHARED(new.mnt->mnt_parent) || +- IS_MNT_SHARED(root.mnt->mnt_parent)) ++ IS_MNT_SHARED(root.mnt->mnt_parent)) && ++ !vx_flags(VXF_STATE_SETUP, 0)) + goto out2; + if (!check_mnt(root.mnt)) + goto out2; diff --git a/kernel-2.6.spec b/kernel-2.6.spec index 80590e9f6..c06a395fc 100644 --- a/kernel-2.6.spec +++ b/kernel-2.6.spec @@ -145,6 +145,7 @@ Patch100: linux-2.6-100-build-nonintconfig.patch # Linux-VServer Patch200: patch-%{rpmversion}-vs%{vsversion}.diff Patch220: delta-ptrace-fix01.diff +Patch230: delta-pivot-fix01.diff # IP sets Patch250: linux-2.6-250-ipsets.patch @@ -157,7 +158,6 @@ Patch522: linux-2.6-522-iptables-connection-tagging.patch Patch523: linux-2.6-523-raw-sockets.patch Patch524: linux-2.6-524-peercred.patch Patch525: linux-2.6-525-sknid-elevator.patch -# Patch526: linux-2.6-526-tun-tap.patch Patch527: linux-2.6-527-iptables-classify-add-mark.patch Patch530: linux-2.6-530-built-by-support.patch Patch540: linux-2.6-540-oom-kill.patch @@ -167,7 +167,6 @@ Patch570: linux-2.6-570-tagxid.patch Patch580: linux-2.6-580-show-proc-virt.patch Patch590: linux-2.6-590-dcookies-mm.patch Patch591: linux-2.6-591-chopstix-intern.patch -# Patch630: linux-2.6-630-sched-fix.patch Patch640: linux-2.6-640-netlink-audit-hack.patch Patch650: linux-2.6-650-hangcheck-reboot.patch Patch660: linux-2.6-660-nmi-watchdog-default.patch @@ -344,6 +343,8 @@ KERNEL_PREVIOUS=vanilla # vserver patch %ApplyPatch 200 +%ApplyPatch 220 +%ApplyPatch 230 %ApplyPatch 250 -- 2.47.0