summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-07-08 13:56:14 +0000
committerPeter Volkov <pva@gentoo.org>2009-07-08 13:56:14 +0000
commitda49a3d89607f357d1e980a8e4b9d3b90d719d89 (patch)
tree16de027b0e57c977e5505557ad2b87cbee5d01f1 /sys-kernel/openvz-sources
parentmkgmap bump (diff)
downloadhistorical-da49a3d89607f357d1e980a8e4b9d3b90d719d89.tar.gz
historical-da49a3d89607f357d1e980a8e4b9d3b90d719d89.tar.bz2
historical-da49a3d89607f357d1e980a8e4b9d3b90d719d89.zip
Added upstream patches. Changed SLOT to reflect upstream versioning, thank Night Nord.
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'sys-kernel/openvz-sources')
-rw-r--r--sys-kernel/openvz-sources/ChangeLog17
-rw-r--r--sys-kernel/openvz-sources/Manifest13
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-avoid-double-free.patch26
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-ban-netns-creation.patch53
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-process-skbs.patch29
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch39
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch29
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-pi-futex-pid-check-fixup.patch27
-rw-r--r--sys-kernel/openvz-sources/openvz-sources-2.6.18.028.060.8.ebuild43
-rw-r--r--sys-kernel/openvz-sources/openvz-sources-2.6.24.009.1.ebuild38
-rw-r--r--sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1-r2.ebuild60
-rw-r--r--sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1.ebuild37
12 files changed, 287 insertions, 124 deletions
diff --git a/sys-kernel/openvz-sources/ChangeLog b/sys-kernel/openvz-sources/ChangeLog
index 8c1621c23d1a..3d928f0aec8e 100644
--- a/sys-kernel/openvz-sources/ChangeLog
+++ b/sys-kernel/openvz-sources/ChangeLog
@@ -1,6 +1,21 @@
# ChangeLog for sys-kernel/openvz-sources
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/ChangeLog,v 1.111 2009/06/26 11:28:54 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/ChangeLog,v 1.112 2009/07/08 13:56:14 pva Exp $
+
+*openvz-sources-2.6.27.2.1-r2 (08 Jul 2009)
+
+ 08 Jul 2009; Peter Volkov <pva@gentoo.org>
+ -openvz-sources-2.6.18.028.060.8.ebuild,
+ -openvz-sources-2.6.24.009.1.ebuild, -openvz-sources-2.6.27.2.1.ebuild,
+ +openvz-sources-2.6.27.2.1-r2.ebuild,
+ +files/openvz-sources-2.6.27.2.1-avoid-double-free.patch,
+ +files/openvz-sources-2.6.27.2.1-ban-netns-creation.patch,
+ +files/openvz-sources-2.6.27.2.1-bridge-process-skbs.patch,
+ +files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch,
+ +files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch,
+ +files/openvz-sources-2.6.27.2.1-pi-futex-pid-check-fixup.patch:
+ Added upstream patches. Changed SLOT to reflect upstream versioning, thank
+ Night Nord.
*openvz-sources-2.6.18.028.062.3 (26 Jun 2009)
diff --git a/sys-kernel/openvz-sources/Manifest b/sys-kernel/openvz-sources/Manifest
index 172644d702af..3af88a1f8f90 100644
--- a/sys-kernel/openvz-sources/Manifest
+++ b/sys-kernel/openvz-sources/Manifest
@@ -6,21 +6,24 @@ AUX openvz-sources-2.6.18.028.057.2-missed-PATH_MAX-sumversion.c.patch 379 RMD16
AUX openvz-sources-2.6.18.028.057.2-qouta-compat-build.patch 365 RMD160 1d7dea5718e0e889c8fe6c6c6cfbd3636fa91ad3 SHA1 5fb1d346e362cb8cd54b4f02283ce185782f7d28 SHA256 c7d3ae9adfe7464ebe7d25948978392c244d2021cda678e30a316295a96ec4ff
AUX openvz-sources-2.6.18.028.057.2-utimenstat.patch 528 RMD160 1edc34e5e0fddd8c0960b8dcbc54d0f0f486a0fa SHA1 26190020c24645e71c10c4da8ab79f120be946e2 SHA256 79cbf231ecea1eb45d94c5f2ef38082e8c9745f25d4fc6e53fa46fb69631dd25
AUX openvz-sources-2.6.18.028.059.6-proper-utimensat.patch 9045 RMD160 20347f1a11d170bd74a656394894a82e79434c12 SHA1 8b348767d4f4f7aaaba04d58182d6fb5b1b17170 SHA256 a90da0c995040f86fc559c7bfebe27db96eb3423c919f034acf710b9dfff97cb
+AUX openvz-sources-2.6.27.2.1-avoid-double-free.patch 746 RMD160 56c953b85e61a9d92fb3fa9afa97f9278713b223 SHA1 b092cba443192d441ed1260e78a7d6846db0bc3c SHA256 2ebd2b63b1acdd09933420fd2d7beec751b4363c513a4192a9bdab3550fa0f7b
+AUX openvz-sources-2.6.27.2.1-ban-netns-creation.patch 1451 RMD160 fb5dd54761508624a3d9a7567206054b55549c46 SHA1 57f6de1ca6bbf9854739b976191de6f12b04c411 SHA256 5ac15c60dbfca7abcb5644c013270270eec375f6197bdf36f3006e38010561f7
+AUX openvz-sources-2.6.27.2.1-bridge-process-skbs.patch 1089 RMD160 2343167ce9242024d9595b08973a44e9b638e822 SHA1 14edbad4478df0d1eccf2d2f0afe37331d25b3f6 SHA256 aed10e5e25e4627e2335c97d5b41901d531f938e110195bd65faaede2b0b14ec
+AUX openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch 1413 RMD160 f7321f8d51ba524b92f7e6db407072a05b0700a0 SHA1 450d529efc2117e8d619ec71f81309a89175bb4c SHA256 51ba7b026f9cea151359bbb102f011f6b56dbbf9aeeb1d4cd6393edb034b0d69
+AUX openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch 853 RMD160 123b7c31b027770229c794414ac50f6e3a0e9f2d SHA1 0f93121aaa4dd4590f8e9853b39c3bc7b76f84d7 SHA256 8fa6994fed7c67c08c3cd0f8c0de0cfd604e7af39c53a210b6c82bf0d35994d2
+AUX openvz-sources-2.6.27.2.1-pi-futex-pid-check-fixup.patch 850 RMD160 7e09373594e7e0907eee302e30b174de4bed0245 SHA1 d2e58e07f8364cfc1277c1df655766dc2cb4929f SHA256 0c6513efeca40f1966a933687d52ba17aca6ccb58b6bc03dce7f18101c98f0c7
DIST linux-2.6.18.tar.bz2 41863580 RMD160 f92283f956880676bfb1f1d5288325461e4e02e7 SHA1 178f7d5bb3af0978d42b37651b8753323c7129c2 SHA256 c95280ff6c5d2a17788f7cc582d23ae8a9a7ba3f202ec6e4238eaadfce7c163d
DIST linux-2.6.24.tar.bz2 46737783 RMD160 0e5194c69c3d82c41ece689c4f84e638f8776d34 SHA1 351aebc784a5395fe4c92d1e514a89680482f7e2 SHA256 413c64fbbcf81244cb5571be4963644a1e81166a2b0f008a016528363b65c5d3
DIST linux-2.6.27.tar.bz2 50355835 RMD160 5be4595ad824a4af67c1ec0c692838ad0c31f0c0 SHA1 8425ec3be2652f9d511911ff4fcf99039d4574be SHA256 0e99bf9e83f4d1ae0c656741a84dfddfa9c4d2469cf35475f5939d02dc3e4393
DIST patch-128.1.1.el5.028stab062.3-combined.gz 13182498 RMD160 4b93a91685384a0f284a28a6f3368d4a9f6d1aa4 SHA1 047f73245a1500b2b5f362f343a0d48b417a2510 SHA256 2371355ffd2c3ee60598a6d663f0e5a3f7eb75f0e32707bf9ee88a14eda67e0a
-DIST patch-92.1.18.el5.028stab060.8-combined.gz 10704441 RMD160 3b44f7687071f3570783003d8e3a961bb03cef74 SHA1 7fc47555b5fb4c1bb9734e13178f101c976d7a54 SHA256 b6b91d4460e13f5c106af36ae6366a0186c0137dadba35b0f40093285a043748
DIST patch-briullov.1-combined.gz 919351 RMD160 5d49786c302a0e50b8d965037b4a28c2bd6c97b8 SHA1 10ecb9f6b89e3c68939383ef4ee8f069ad4abd60 SHA256 ea3369b84299b82b3983d48154d86a8275335f03d1c07cd15db8b6adc41bf4d7
DIST patch-ovz009.1-combined.gz 874874 RMD160 b57c976485565c71e6495f24e7f8cf8d11507c2e SHA1 cffbee2b4bc41e0919572ce6971c41d45be6c56a SHA256 1d837a763bb01c1b0d9e4007f2376a05c73d7174c48624fb467042ccebdff0a8
DIST patch-ovz028stab056.1-combined.gz 1167989 RMD160 7953e020db894ddd9c6e61b6cbbedea0179ab09b SHA1 105ef675c10ed7063309dd636d2580a5cc3c05dd SHA256 2a99359fcf8af8f4b5ffd56011a63c2300086f944784ff855a9f7ecf46434df9
EBUILD openvz-sources-2.6.18.028.056.1.ebuild 1765 RMD160 1c54e78e69e1868ffe0219fd0d7af07cf0ce52c1 SHA1 7eac1758a9b24f69c7475041d47ae761019a6700 SHA256 a9209ad3c1a16dc223a5c823fbf3ea827a2b7f027c8910705b6994f67c538c63
-EBUILD openvz-sources-2.6.18.028.060.8.ebuild 1768 RMD160 2be29867c0ed20d40faa0132e43f23d070196f63 SHA1 defa4ba1c71cb2f1d52dc38edb0d583937d09cc6 SHA256 f74a739d48bdce37554555e51433c17eece443b8805cd32fb8f7d76dc3b91522
EBUILD openvz-sources-2.6.18.028.062.3.ebuild 1764 RMD160 b9fc8e69dee4f3fc91b08674b88310f02442fb0c SHA1 6dbff1b800f7c6da9b2a1d2adbde49ca39ae81b1 SHA256 56f51e4cf79e7a65e9f58a5d98f42c5849a298e9747e1200a9c9760147cbe049
EBUILD openvz-sources-2.6.24.009.1-r2.ebuild 1371 RMD160 869f8c26e53e972ea5a825886780c971de955b6e SHA1 6f17e063a234b21e67d9b22b2d7b1e33b68d19b4 SHA256 732bb94e4aecdee17a479b2c4a84889428d2ba6579ce03541b37b7d570c5b396
-EBUILD openvz-sources-2.6.24.009.1.ebuild 1479 RMD160 653643287585b05e0b2481b5c86a3090b4839a8b SHA1 c11c70d82e7919f2ff0f54d695a796b516b86511 SHA256 b3443261c9c6b44ec1c4d07dfe82b745eae5aad816d0f882544f64ed6f451d70
EBUILD openvz-sources-2.6.27.2.1-r1.ebuild 1666 RMD160 85e72630cb4aec42ceba49ed6587f5cd1a65818f SHA1 02b0149ee92f31f1b38efd3b8d97eb7ed7a6be1c SHA256 8acd16fc39184e6387a188d9caf5532d6de081fce63e7206326bafd9fd84b76e
-EBUILD openvz-sources-2.6.27.2.1.ebuild 1336 RMD160 6b156231780dab81b946521088e64b570b55e511 SHA1 6b64967c90c8698519fac8c7bf43a3407d7ad416 SHA256 ded74abd7a721a0f5b19617be6ca3760c701536886bc4eecb6f1ac84ecd3f8d6
+EBUILD openvz-sources-2.6.27.2.1-r2.ebuild 2127 RMD160 50600207a739dde56331461e969d61f5bcf6bf19 SHA1 e5a1d97b51031d3abbb2d3bce23af889d7d6938f SHA256 bb25dac8a7dc6ea5895eb3c43f1318a786d230b1d0b76579f41a8f37046807b4
EBUILD openvz-sources-2.6.27.9999.ebuild 936 RMD160 ce059496362ca23f57b6f75e6a844d3a8c5c164a SHA1 aad5e0a3891e1d03a45fa2ff64d2df39c1bdf777 SHA256 2bebffda43407ddb1f516b824e744778ff0e5e317ebfed9bddb3072f4beeac9b
-MISC ChangeLog 26896 RMD160 eba84f2bbd1c2a93e148d271f5f01b1654141130 SHA1 652b9cc611ce6232b60b0dd98d27dc064331349d SHA256 1f2d564a55b7f2c2f2187176d128418959817c1ef06252be6aeb91d9d296aedc
+MISC ChangeLog 27618 RMD160 b72dd23bc01b02ed4d67fda70c800a6431ccf28c SHA1 96735ff2085865eb789edb41c43aa02a7146e475 SHA256 24b73b7f7dc8f143f20bb367952e2d4225474e48572f1b25b666529059bab60c
MISC metadata.xml 554 RMD160 0d62a03694a7c0e0caa538a603b3a41916451887 SHA1 d4d18f1c2c52425a1a819ac0d76ff1c906853047 SHA256 78f7ce5323a1a18773d5a6a01cffcc729fb51f4a667b5d2df37450907a007a31
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-avoid-double-free.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-avoid-double-free.patch
new file mode 100644
index 000000000000..755bd4ed67e8
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-avoid-double-free.patch
@@ -0,0 +1,26 @@
+From: Pavel Emelyanov <xemul@openvz.org>
+Date: Wed, 22 Apr 2009 15:05:03 +0000 (+0400)
+Subject: net: avoid double free on net->gen pointer on error
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=4f908925f495ea1e2f401b8fcf3cdc91c5968429
+
+net: avoid double free on net->gen pointer on error
+
+If we failed with netns creation net->gen will be kfree-ed twice.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1241
+
+Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
+---
+
+diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
+index 523eba0..64b0a40 100644
+--- a/net/core/net_namespace.c
++++ b/net/core/net_namespace.c
+@@ -75,6 +75,7 @@ out_undo:
+ }
+
+ rcu_barrier();
++ net->gen = NULL;
+ kfree(ng);
+ goto out;
+ }
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-ban-netns-creation.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-ban-netns-creation.patch
new file mode 100644
index 000000000000..49191ce427f3
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-ban-netns-creation.patch
@@ -0,0 +1,53 @@
+From: Pavel Emelyanov <xemul@openvz.org>
+Date: Fri, 10 Apr 2009 11:22:09 +0000 (+0400)
+Subject: namespaces: ban netns creation even for ve0's root
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=5728d99a5ae464d533487ef5874a3f9ea9ff2097
+
+namespaces: ban netns creation even for ve0's root
+
+netnamespace do not work with sysfs yet, so creating one
+can be fatal
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1234
+
+Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
+---
+
+diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
+index 052b894..25288ad 100644
+--- a/kernel/nsproxy.c
++++ b/kernel/nsproxy.c
+@@ -142,9 +142,20 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk,
+ CLONE_NEWUSER | CLONE_NEWPID | CLONE_NEWNET)))
+ return 0;
+
+- if (!capable(CAP_SYS_ADMIN) && !force_admin) {
+- err = -EPERM;
+- goto out;
++ if (!force_admin) {
++ if (!capable(CAP_SYS_ADMIN)) {
++ err = -EPERM;
++ goto out;
++ }
++
++ /*
++ * netns-vs-sysfs is deadly broken, thus new namespace
++ * (even in ve0) can bring the node down
++ */
++ if (flags & CLONE_NEWNET) {
++ err = -EINVAL;
++ goto out;
++ }
+ }
+
+ /*
+@@ -221,6 +232,9 @@ int unshare_nsproxy_namespaces(unsigned long unshare_flags,
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
++ if (unshare_flags & CLONE_NEWNET)
++ return -EINVAL;
++
+ *new_nsp = create_new_namespaces(unshare_flags, current,
+ new_fs ? new_fs : current->fs);
+ if (IS_ERR(*new_nsp)) {
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-process-skbs.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-process-skbs.patch
new file mode 100644
index 000000000000..be6606477f61
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-process-skbs.patch
@@ -0,0 +1,29 @@
+From: Cyrill Gorcunov <gorcunov@openvz.org>
+Date: Tue, 21 Apr 2009 12:00:07 +0000 (+0400)
+Subject: net: bridge - process skbs has been already substituted due to via_phys_dev
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=ac9403982e62e2eb33ec19264d2d389f09034320
+
+net: bridge - process skbs has been already substituted due to via_phys_dev
+
+When via_phys_dev is enabled we substitute skb->dev with
+master_dev and pass it back to bridge code. Instead of
+dropping such skb we should pass it up to network stack
+to process.
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
+---
+
+diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
+index 44fb444..1a650ac 100644
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -160,7 +160,7 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb)
+ /* fall through */
+ case BR_STATE_LEARNING:
+ if (skb->brmark == BR_ALREADY_SEEN)
+- return 0;
++ return skb;
+
+ out = p->br->via_phys_dev ? p->br->master_dev : p->br->dev;
+
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch
new file mode 100644
index 000000000000..de6d70522188
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch
@@ -0,0 +1,39 @@
+From: Cyrill Gorcunov <gorcunov@openvz.org>
+Date: Tue, 7 Apr 2009 17:59:25 +0000 (+0400)
+Subject: net: bridge - set_via_phys_dev_state should return int value
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=649958ef9120ebea8ed3d216e02a9218e9acad8d
+
+net: bridge - set_via_phys_dev_state should return int value
+
+While playing with bridge code I found the following
+compiler warning
+
+| CC net/bridge/br_sysfs_br.o
+|net/bridge/br_sysfs_br.c: In function ‘store_via_phys_dev_state’:
+|net/bridge/br_sysfs_br.c:199: warning: passing argument 4 of
+|‘store_bridge_parm’ from incompatible pointer type
+
+This is due to store_bridge_parm uses int returning callback.
+Fix it.
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
+---
+
+diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
+index 5b6f301..b33cf32 100644
+--- a/net/bridge/br_sysfs_br.c
++++ b/net/bridge/br_sysfs_br.c
+@@ -188,9 +188,10 @@ static ssize_t show_via_phys_dev_state(struct device *cd,
+ return sprintf(buf, "%d\n", br->via_phys_dev);
+ }
+
+-static void set_via_phys_dev_state(struct net_bridge *br, unsigned long val)
++static int set_via_phys_dev_state(struct net_bridge *br, unsigned long val)
+ {
+- br->via_phys_dev = val;
++ br->via_phys_dev = val ? 1 : 0;
++ return 0;
+ }
+
+ static ssize_t store_via_phys_dev_state(struct device *cd,
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch
new file mode 100644
index 000000000000..451489ad424e
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch
@@ -0,0 +1,29 @@
+From: Cyrill Gorcunov <gorcunov@openvz.org>
+Date: Thu, 23 Apr 2009 09:47:54 +0000 (+0400)
+Subject: mm: check for no mmaps in exit_mmap()
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=acfd6c89981b9de80b96741380780ffe6c87a15d
+
+mm: check for no mmaps in exit_mmap()
+
+Backported commit dcd4a049 from the mainstream.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1230
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
+---
+
+diff --git a/mm/mmap.c b/mm/mmap.c
+index 564186a..2679a9c 100644
+--- a/mm/mmap.c
++++ b/mm/mmap.c
+@@ -2133,6 +2133,9 @@ void exit_mmap(struct mm_struct *mm)
+ arch_exit_mmap(mm);
+ mmu_notifier_release(mm);
+
++ if (!vma) /* Can happen if dup_mmap() received an OOM */
++ return;
++
+ lru_add_drain();
+ flush_cache_mm(mm);
+ tlb = tlb_gather_mmu(mm, 1);
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-pi-futex-pid-check-fixup.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-pi-futex-pid-check-fixup.patch
new file mode 100644
index 000000000000..a12ec51e196d
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-pi-futex-pid-check-fixup.patch
@@ -0,0 +1,27 @@
+From: Konstantin Khlebnikov <khlebnikov@openvz.org>
+Date: Wed, 3 Jun 2009 12:34:08 +0000 (+0400)
+Subject: pidns: pi-futex pid check fixup
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=81e645095ced04ab9bff9680f112774c396ab13f
+
+pidns: pi-futex pid check fixup
+
+fix WARN_ON condition
+
+port rh5 patch from Stanichenko Marat <mstanichenko@openvz.org>
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1262
+---
+
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 1cc3092..d1351bb 100644
+--- a/kernel/futex.c
++++ b/kernel/futex.c
+@@ -534,7 +534,7 @@ lookup_pi_state(u32 uval, struct futex_hash_bucket *hb,
+
+ WARN_ON(!atomic_read(&pi_state->refcount));
+ WARN_ON(pid && pi_state->owner &&
+- pi_state->owner->pid != pid);
++ task_pid_vnr(pi_state->owner) != pid);
+
+ atomic_inc(&pi_state->refcount);
+ *ps = pi_state;
diff --git a/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.060.8.ebuild b/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.060.8.ebuild
deleted file mode 100644
index c6b9c86159d4..000000000000
--- a/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.060.8.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.060.8.ebuild,v 1.1 2009/04/02 19:55:30 bangert Exp $
-
-inherit versionator
-
-ETYPE="sources"
-
-CKV=$(get_version_component_range 1-3)
-OKV=${OKV:-${CKV}}
-if [[ ${PR} == "r0" ]]; then
-KV_FULL=${CKV}-${PN/-*}-$(get_version_component_range 4-6)
-else
-KV_FULL=${CKV}-${PN/-*}-$(get_version_component_range 4-6)-${PR}
-fi
-OVZ_KERNEL="$(get_version_component_range 4)stab$(get_version_component_range 5)"
-OVZ_REV="$(get_version_component_range 6)"
-EXTRAVERSION=-${OVZ_KERNEL}
-KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
-
-inherit kernel-2
-detect_version
-
-KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
-IUSE=""
-
-DESCRIPTION="Full sources including OpenVZ patchset for the 2.6.18 kernel tree"
-HOMEPAGE="http://www.openvz.org"
-SRC_URI="${KERNEL_URI} ${ARCH_URI}
- http://download.openvz.org/kernel/branches/rhel5-${CKV}/${OVZ_KERNEL}.${OVZ_REV}/patches/patch-92.1.18.el5.${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-UNIPATCH_STRICTORDER=1
-UNIPATCH_LIST="${DISTDIR}/patch-92.1.18.el5.${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-K_EXTRAEINFO="This openvz kernel uses RHEL5 patchset instead of vanilla kernel.
-This patchset considered to be more stable and security supported by upstream,
-that why they suggested us to use it. But note: RHEL5 patchset is very fragile
-and fails to build in many configurations so if you have problems use config
-files from openvz team
-http://wiki.openvz.org/Download/kernel/rhel5/028stab059.9"
-
-K_EXTRAEWARN="This kernel is stable only when built with gcc-4.1.x and is known
-to oops in random places if built with newer compilers."
diff --git a/sys-kernel/openvz-sources/openvz-sources-2.6.24.009.1.ebuild b/sys-kernel/openvz-sources/openvz-sources-2.6.24.009.1.ebuild
deleted file mode 100644
index b82cd2a8569b..000000000000
--- a/sys-kernel/openvz-sources/openvz-sources-2.6.24.009.1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.24.009.1.ebuild,v 1.1 2009/04/16 16:11:41 bangert Exp $
-
-inherit versionator
-
-ETYPE="sources"
-
-CKV=$(get_version_component_range 1-3)
-OKV=${OKV:-${CKV}}
-OVZ_KERNEL="ovz$(get_version_component_range 4)"
-if [[ ${PR} == "r0" ]]; then
-KV_FULL=${CKV}-${PN/-*}-$(get_version_component_range 4).$(get_version_component_range 5)
-EXTRAVERSION=-${OVZ_KERNEL}
-else
-KV_FULL=${CKV}-${PN/-*}-$(get_version_component_range 4).$(get_version_component_range 5)-${PR}
-EXTRAVERSION=-${OVZ_KERNEL}-${PR}
-fi
-OVZ_REV="$(get_version_component_range 5)"
-KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
-
-inherit kernel-2
-detect_version
-
-KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
-IUSE=""
-
-DESCRIPTION="Full sources including OpenVZ patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="http://www.openvz.org"
-SRC_URI="${KERNEL_URI} ${ARCH_URI}
- http://download.openvz.org/kernel/branches/${CKV}/${CKV}-${OVZ_KERNEL}.${OVZ_REV}/patches/patch-${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-UNIPATCH_STRICTORDER=1
-UNIPATCH_LIST="${DISTDIR}/patch-${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-K_EXTRAEINFO="This is development branch of openvz-sources. For more information
-about this kernel tak a look at:
-http://wiki.openvz.org/Download/kernel/${CKV}/${CKV}-${OVZ_KERNEL}.${OVZ_REV}"
diff --git a/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1-r2.ebuild b/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1-r2.ebuild
new file mode 100644
index 000000000000..3a0b74a27770
--- /dev/null
+++ b/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1-r2.ebuild,v 1.1 2009/07/08 13:56:14 pva Exp $
+
+inherit versionator
+
+# Upstream uses string to version their releases. To make portage version
+# comparisment working we have to use numbers instead of strings, that is 4th
+# component of our version. So we have aivazovsky - 1, briullov - 2 and so on.
+# Keep this string on top since we have to modify it each new release.
+OVZ_CODENAME="briullov"
+OVZ_CODENAME_SUBRELEASE=$(get_version_component_range 5)
+
+OVZ_KV="${OVZ_CODENAME}.${OVZ_CODENAME_SUBRELEASE}"
+
+ETYPE="sources"
+
+CKV=$(get_version_component_range 1-3)
+OKV=${OKV:-${CKV}}
+EXTRAVERSION=-${PN/-*}-${OVZ_KV}
+KV_FULL=${CKV}${EXTRAVERSION}
+if [[ ${PR} != r0 ]]; then
+ KV_FULL+=-${PR}
+ EXTRAVERSION+=-${PR}
+fi
+
+# ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} should succeed.
+KV_MAJOR=$(get_version_component_range 1 ${OKV})
+KV_MINOR=$(get_version_component_range 2 ${OKV})
+KV_PATCH=$(get_version_component_range 3 ${OKV})
+
+KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
+
+inherit kernel-2
+detect_version
+
+SLOT=${CKV}-${OVZ_KV}
+if [[ ${PR} != r0 ]]; then
+ SLOT+=-${PR}
+fi
+
+KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
+IUSE=""
+
+DESCRIPTION="Kernel sources with OpenVZ patchset"
+HOMEPAGE="http://www.openvz.org"
+SRC_URI="${KERNEL_URI} ${ARCH_URI}
+ http://download.openvz.org/kernel/branches/${CKV}/${CKV}-${OVZ_KV}/patches/patch-${OVZ_KV}-combined.gz"
+
+UNIPATCH_STRICTORDER=1
+UNIPATCH_LIST="${DISTDIR}/patch-${OVZ_KV}-combined.gz
+${FILESDIR}/${PN}-2.6.27.2.1-ban-netns-creation.patch
+${FILESDIR}/${PN}-2.6.27.2.1-bridge-process-skbs.patch
+${FILESDIR}/${PN}-2.6.27.2.1-bridge-set_via_phys_dev_state.patch
+${FILESDIR}/${PN}-2.6.27.2.1-avoid-double-free.patch
+${FILESDIR}/${PN}-2.6.27.2.1-check-for-no-mmaps.patch
+${FILESDIR}/${PN}-2.6.27.2.1-pi-futex-pid-check-fixup.patch"
+
+K_EXTRAEINFO="For more information about this kernel take a look at:
+http://wiki.openvz.org/Download/kernel/${CKV}/${CKV}-${OVZ_KV}"
diff --git a/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1.ebuild b/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1.ebuild
deleted file mode 100644
index d05774234338..000000000000
--- a/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.27.2.1.ebuild,v 1.1 2009/04/18 20:10:36 bangert Exp $
-
-inherit versionator
-
-ETYPE="sources"
-
-CKV=$(get_version_component_range 1-3)
-OKV=${OKV:-${CKV}}
-OVZ_REV="$(get_version_component_range 5)"
-OVZ_KERNEL="briullov"
-if [[ ${PR} == "r0" ]]; then
- EXTRAVERSION=-${PN/-*}-${OVZ_KERNEL}.${OVZ_REV}
-else
- EXTRAVERSION=-${PN/-*}-${OVZ_KERNEL}.${OVZ_REV}-${PR}
-fi
-KV_FULL=${CKV}${EXTRAVERSION}
-KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
-
-inherit kernel-2
-detect_version
-
-KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
-IUSE=""
-
-DESCRIPTION="Full sources including OpenVZ patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="http://www.openvz.org"
-SRC_URI="${KERNEL_URI} ${ARCH_URI}
- http://download.openvz.org/kernel/branches/${CKV}/${CKV}-${OVZ_KERNEL}.${OVZ_REV}/patches/patch-${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-UNIPATCH_STRICTORDER=1
-UNIPATCH_LIST="${DISTDIR}/patch-${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-K_EXTRAEINFO="This is development branch of openvz-sources. For more information
-about this kernel tak a look at:
-http://wiki.openvz.org/Download/kernel/${CKV}/${CKV}-${OVZ_KERNEL}.${OVZ_REV}"