update openvz patch

fixes several oopses on checkpoint, migration and networking.

svn path=/dists/sid/linux-2.6/; revision=15907
This commit is contained in:
Maximilian Attems 2010-06-24 12:55:38 +00:00
parent 2f419e8f7b
commit 50343acbfa
2 changed files with 131 additions and 54 deletions

3
debian/changelog vendored
View File

@ -72,6 +72,9 @@ linux-2.6 (2.6.32-16) UNRELEASED; urgency=low
bridge.
* Disable ISDN4Linux drivers.
[ maximilian attems]
* Update openvz patch to 5fd638726a69.
-- dann frazier <dannf@debian.org> Tue, 01 Jun 2010 09:23:57 -0600
linux-2.6 (2.6.32-15) unstable; urgency=low

View File

@ -1,3 +1,72 @@
commit 5fd638726a6999e334e5e2c0635a03a447adc0d1
Author: Pavel Emelyanov <xemul@openvz.org>
Date: Thu Jun 17 20:45:46 2010 +0400
OpenVZ kernel 2.6.32-budarin released
Named after Nikolai Mikhailovich Budarin - a Russian cosmonaut
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
commit 25ded1908b24b122325003fe56afa5bc78511aad
Merge: 7e99ed1 c5f1e1a
Author: Pavel Emelyanov <xemul@openvz.org>
Date: Thu Jun 17 20:40:20 2010 +0400
Merged linux-2.6.32.15
Conflicts:
Makefile
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
commit 7e99ed1bc34b60ed42eb2008edbb4f98684edb0a
Author: Stanislav Kinsbursky <skinsbursky@openvz.org>
Date: Thu Jun 17 20:25:43 2010 +0400
CPT: Replace legacy net statistics with netns one
http://bugzilla.openvz.org/show_bug.cgi?id=1543
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
commit ad21fa5e96fc66a63364f210aebf4f4f95345ee4
Author: Stanislav Kinsbursky <skinsbursky@openvz.org>
Date: Thu Jun 17 20:24:21 2010 +0400
NET: register net sysfs kobject inside container
Adding of net kobject was supressed if network namespace is not
"init_net". Check for "init_net" is removed.
http://bugzilla.openvz.org/show_bug.cgi?id=1534
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
commit 9783d9e288e8ca754cabf77e7eb68099a75a5292
Author: Andrey Vagin <avagin@openvz.org>
Date: Fri Jun 11 19:48:34 2010 +0400
cpt: fix refcounting of tty and pid on setting tty to process
http://bugzilla.openvz.org/show_bug.cgi?id=1544
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
commit b2fecd288e7d0457df18e57f11685e007cd09ad6
Author: Pavel Emelyanov <xemul@openvz.org>
Date: Fri Jun 11 18:36:51 2010 +0400
mm: Fix oops in do_wp_page
http://bugzilla.openvz.org/show_bug.cgi?id=1541
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
commit e7399c239fadcc813adcf4f947b00ec199d6a11b
Author: Pavel Emelyanov <xemul@openvz.org>
Date: Thu May 27 20:07:25 2010 +0400
@ -6251,14 +6320,14 @@ index 0000000..9856a2b
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/Makefile b/Makefile
index 47866f8..7503318 100644
index 36fead3..674349f 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 32
EXTRAVERSION =
+VZVERSION = belyayev
+VZVERSION = budarin
NAME = Man-Eating Seals of Antiquity
# *DOCUMENTATION*
@ -35479,10 +35548,10 @@ index 69f3997..6c74733 100644
static inline void get_uts_ns(struct uts_namespace *ns)
diff --git a/include/linux/ve.h b/include/linux/ve.h
new file mode 100644
index 0000000..e0e045a
index 0000000..e473727
--- /dev/null
+++ b/include/linux/ve.h
@@ -0,0 +1,367 @@
@@ -0,0 +1,359 @@
+/*
+ * include/linux/ve.h
+ *
@ -35724,14 +35793,6 @@ index 0000000..e0e045a
+ struct ve_ipt_recent *_ipt_recent;
+ struct ve_xt_hashlimit *_xt_hashlimit;
+#endif /* CONFIG_VE_IPTABLES */
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+ struct ipstats_mib *_ipv6_statistics[2];
+ struct icmpv6_mib *_icmpv6_statistics[2];
+ struct icmpv6msg_mib *_icmpv6msg_statistics[2];
+ struct udp_mib *_udp_stats_in6[2];
+ struct udp_mib *_udplite_stats_in6[2];
+#endif
+#endif
+ wait_queue_head_t *_log_wait;
+ unsigned *_log_start;
@ -51828,7 +51889,7 @@ index 0000000..dc2c483
+extern struct vm_operations_struct special_mapping_vmops;
diff --git a/kernel/cpt/cpt_net.c b/kernel/cpt/cpt_net.c
new file mode 100644
index 0000000..4e183ba
index 0000000..473a294
--- /dev/null
+++ b/kernel/cpt/cpt_net.c
@@ -0,0 +1,652 @@
@ -52451,11 +52512,11 @@ index 0000000..4e183ba
+ cpt_dump_snmp_stat(ctx, (void **)&net->mib.icmpmsg_statistics,
+ ICMPMSG_MIB_MAX);
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+ cpt_dump_snmp_stat(ctx, (void **)&ve->_ipv6_statistics,
+ cpt_dump_snmp_stat(ctx, (void **)&net->mib.ipv6_statistics,
+ IPSTATS_MIB_MAX);
+ cpt_dump_snmp_stat(ctx, (void **)&ve->_udp_stats_in6,
+ cpt_dump_snmp_stat(ctx, (void **)&net->mib.udp_stats_in6,
+ UDP_MIB_MAX);
+ cpt_dump_snmp_stat(ctx, (void **)&ve->_icmpv6_statistics,
+ cpt_dump_snmp_stat(ctx, (void **)&net->mib.icmpv6_statistics,
+ ICMP6_MIB_MAX);
+#else
+ cpt_dump_snmp_stub(ctx);
@ -61037,7 +61098,7 @@ index 0000000..78627cc
+}
diff --git a/kernel/cpt/rst_net.c b/kernel/cpt/rst_net.c
new file mode 100644
index 0000000..4c8d482
index 0000000..5da7a8c
--- /dev/null
+++ b/kernel/cpt/rst_net.c
@@ -0,0 +1,745 @@
@ -61752,15 +61813,15 @@ index 0000000..4c8d482
+ if (err <= 0)
+ goto out;
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+ err = rst_restore_snmp_stat(ctx, (void **)&ve->_ipv6_statistics,
+ err = rst_restore_snmp_stat(ctx, (void **)&net->mib.ipv6_statistics,
+ IPSTATS_MIB_MAX, &sec, endsec);
+ if (err <= 0)
+ goto out;
+ err = rst_restore_snmp_stat(ctx, (void **)&ve->_udp_stats_in6,
+ err = rst_restore_snmp_stat(ctx, (void **)&net->mib.udp_stats_in6,
+ UDP_MIB_MAX, &sec, endsec);
+ if (err <= 0)
+ goto out;
+ err = rst_restore_snmp_stat(ctx, (void **)&ve->_icmpv6_statistics,
+ err = rst_restore_snmp_stat(ctx, (void **)&net->mib.icmpv6_statistics,
+ ICMP6_MIB_MAX, &sec, endsec);
+#endif
+ if (err == 1)
@ -62376,10 +62437,10 @@ index 0000000..beaaa3f
+module_exit(exit_rst);
diff --git a/kernel/cpt/rst_process.c b/kernel/cpt/rst_process.c
new file mode 100644
index 0000000..000e0b9
index 0000000..ffed431
--- /dev/null
+++ b/kernel/cpt/rst_process.c
@@ -0,0 +1,1661 @@
@@ -0,0 +1,1663 @@
+/*
+ *
+ * kernel/cpt/rst_process.c
@ -62795,8 +62856,10 @@ index 0000000..000e0b9
+ struct tty_struct *tty = obj->o_obj;
+ if (!tty->session || tty->session ==
+ task_session(current)) {
+ tty->session = task_session(current);
+ current->signal->tty = tty;
+ put_pid(tty->session);
+ tty->session = get_pid(task_session(current));
+ tty_kref_put(current->signal->tty);
+ current->signal->tty = tty_kref_get(tty);
+ } else {
+ wprintk_ctx("tty session mismatch\n");
+ }
@ -69423,7 +69486,7 @@ index 84027cf..d3151a1 100644
/**
* kthread_stop - stop a thread created by kthread_create().
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index f672d51..bc200db 100644
index 9af5672..99c3c9b 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -3742,7 +3742,7 @@ retry:
@ -69445,7 +69508,7 @@ index f672d51..bc200db 100644
printk("\n");
printk("=============================================\n\n");
diff --git a/kernel/module.c b/kernel/module.c
index a4aae35..6d7a625 100644
index dfa33e8..48a2edc 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2915,6 +2915,8 @@ static char *module_flags(struct module *mod, char *buf)
@ -76275,7 +76338,7 @@ index dacc641..9d28f5c 100644
if (!task_early_kill(tsk))
diff --git a/mm/memory.c b/mm/memory.c
index 4e59455..220dc95 100644
index 4e59455..c5108b1 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -42,6 +42,9 @@
@ -76546,15 +76609,16 @@ index 4e59455..220dc95 100644
old_page = vm_normal_page(vma, address, orig_pte);
if (!old_page) {
@@ -2100,6 +2158,7 @@ reuse:
@@ -2100,6 +2158,8 @@ reuse:
flush_cache_page(vma, address, pte_pfn(orig_pte));
entry = pte_mkyoung(orig_pte);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
+ ClearPageCheckpointed(old_page);
+ if (old_page)
+ ClearPageCheckpointed(old_page);
if (ptep_set_access_flags(vma, address, page_table, entry,1))
update_mmu_cache(vma, address, entry);
ret |= VM_FAULT_WRITE;
@@ -2113,6 +2172,9 @@ reuse:
@@ -2113,6 +2173,9 @@ reuse:
gotten:
pte_unmap_unlock(page_table, ptl);
@ -76564,7 +76628,7 @@ index 4e59455..220dc95 100644
if (unlikely(anon_vma_prepare(vma)))
goto oom;
@@ -2147,12 +2209,15 @@ gotten:
@@ -2147,12 +2210,15 @@ gotten:
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
if (likely(pte_same(*page_table, orig_pte))) {
if (old_page) {
@ -76581,7 +76645,7 @@ index 4e59455..220dc95 100644
flush_cache_page(vma, address, pte_pfn(orig_pte));
entry = mk_pte(new_page, vma->vm_page_prot);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
@@ -2164,6 +2229,7 @@ gotten:
@@ -2164,6 +2230,7 @@ gotten:
*/
ptep_clear_flush(vma, address, page_table);
page_add_new_anon_rmap(new_page, vma, address);
@ -76589,7 +76653,7 @@ index 4e59455..220dc95 100644
/*
* We call the notify macro here because, when using secondary
* mmu page tables (such as kvm shadow page tables), we want the
@@ -2207,6 +2273,7 @@ gotten:
@@ -2207,6 +2274,7 @@ gotten:
page_cache_release(new_page);
if (old_page)
page_cache_release(old_page);
@ -76597,7 +76661,7 @@ index 4e59455..220dc95 100644
unlock:
pte_unmap_unlock(page_table, ptl);
if (dirty_page) {
@@ -2246,6 +2313,8 @@ unlock:
@@ -2246,6 +2314,8 @@ unlock:
oom_free_new:
page_cache_release(new_page);
oom:
@ -76606,7 +76670,7 @@ index 4e59455..220dc95 100644
if (old_page) {
if (page_mkwrite) {
unlock_page(old_page);
@@ -2502,10 +2571,16 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2502,10 +2572,16 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
pte_t pte;
struct mem_cgroup *ptr = NULL;
int ret = 0;
@ -76624,7 +76688,7 @@ index 4e59455..220dc95 100644
entry = pte_to_swp_entry(orig_pte);
if (unlikely(non_swap_entry(entry))) {
if (is_migration_entry(entry)) {
@@ -2580,6 +2655,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2580,6 +2656,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
*/
inc_mm_counter(mm, anon_rss);
@ -76632,7 +76696,7 @@ index 4e59455..220dc95 100644
pte = mk_pte(page, vma->vm_page_prot);
if ((flags & FAULT_FLAG_WRITE) && reuse_swap_page(page)) {
pte = maybe_mkwrite(pte_mkdirty(pte), vma);
@@ -2588,11 +2664,14 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2588,11 +2665,14 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
flush_icache_page(vma, page);
set_pte_at(mm, address, page_table, pte);
page_add_anon_rmap(page, vma, address);
@ -76648,7 +76712,7 @@ index 4e59455..220dc95 100644
try_to_free_swap(page);
unlock_page(page);
@@ -2608,6 +2687,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2608,6 +2688,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
unlock:
pte_unmap_unlock(page_table, ptl);
out:
@ -76660,7 +76724,7 @@ index 4e59455..220dc95 100644
return ret;
out_nomap:
mem_cgroup_cancel_charge_swapin(ptr);
@@ -2615,6 +2699,7 @@ out_nomap:
@@ -2615,6 +2700,7 @@ out_nomap:
out_page:
unlock_page(page);
out_release:
@ -76668,7 +76732,7 @@ index 4e59455..220dc95 100644
page_cache_release(page);
return ret;
}
@@ -2631,6 +2716,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2631,6 +2717,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
struct page *page;
spinlock_t *ptl;
pte_t entry;
@ -76676,7 +76740,7 @@ index 4e59455..220dc95 100644
if (!(flags & FAULT_FLAG_WRITE)) {
entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
@@ -2645,6 +2731,9 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2645,6 +2732,9 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
/* Allocate our own private page. */
pte_unmap(page_table);
@ -76686,7 +76750,7 @@ index 4e59455..220dc95 100644
if (unlikely(anon_vma_prepare(vma)))
goto oom;
page = alloc_zeroed_user_highpage_movable(vma, address);
@@ -2665,12 +2754,15 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2665,12 +2755,15 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
inc_mm_counter(mm, anon_rss);
page_add_new_anon_rmap(page, vma, address);
@ -76702,7 +76766,7 @@ index 4e59455..220dc95 100644
pte_unmap_unlock(page_table, ptl);
return 0;
release:
@@ -2680,6 +2772,8 @@ release:
@@ -2680,6 +2773,8 @@ release:
oom_free_page:
page_cache_release(page);
oom:
@ -76711,7 +76775,7 @@ index 4e59455..220dc95 100644
return VM_FAULT_OOM;
}
@@ -2707,6 +2801,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2707,6 +2802,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
int anon = 0;
int charged = 0;
struct page *dirty_page = NULL;
@ -76719,7 +76783,7 @@ index 4e59455..220dc95 100644
struct vm_fault vmf;
int ret;
int page_mkwrite = 0;
@@ -2716,9 +2811,13 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2716,9 +2812,13 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
vmf.flags = flags;
vmf.page = NULL;
@ -76734,7 +76798,7 @@ index 4e59455..220dc95 100644
if (unlikely(PageHWPoison(vmf.page))) {
if (ret & VM_FAULT_LOCKED)
@@ -2812,6 +2911,8 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2812,6 +2912,8 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
*/
/* Only go through if we didn't race with anybody else... */
if (likely(pte_same(*page_table, orig_pte))) {
@ -76743,7 +76807,7 @@ index 4e59455..220dc95 100644
flush_icache_page(vma, page);
entry = mk_pte(page, vma->vm_page_prot);
if (flags & FAULT_FLAG_WRITE)
@@ -2828,6 +2929,25 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2828,6 +2930,25 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
}
}
set_pte_at(mm, address, page_table, entry);
@ -76769,7 +76833,7 @@ index 4e59455..220dc95 100644
/* no need to invalidate: a not-present page won't be cached */
update_mmu_cache(vma, address, entry);
@@ -2867,6 +2987,9 @@ out:
@@ -2867,6 +2988,9 @@ out:
page_cache_release(vmf.page);
}
@ -76779,7 +76843,7 @@ index 4e59455..220dc95 100644
return ret;
unwritable_page:
@@ -2994,6 +3117,27 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2994,6 +3118,27 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
pmd_t *pmd;
pte_t *pte;
@ -76807,7 +76871,7 @@ index 4e59455..220dc95 100644
__set_current_state(TASK_RUNNING);
count_vm_event(PGFAULT);
@@ -3038,6 +3182,8 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
@@ -3038,6 +3183,8 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
}
#endif /* __PAGETABLE_PUD_FOLDED */
@ -76816,7 +76880,7 @@ index 4e59455..220dc95 100644
#ifndef __PAGETABLE_PMD_FOLDED
/*
* Allocate page middle directory.
@@ -3068,6 +3214,8 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
@@ -3068,6 +3215,8 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
}
#endif /* __PAGETABLE_PMD_FOLDED */
@ -76825,7 +76889,7 @@ index 4e59455..220dc95 100644
int make_pages_present(unsigned long addr, unsigned long end)
{
int ret, len, write;
@@ -3087,6 +3235,8 @@ int make_pages_present(unsigned long addr, unsigned long end)
@@ -3087,6 +3236,8 @@ int make_pages_present(unsigned long addr, unsigned long end)
return ret == len ? 0 : -EFAULT;
}
@ -81668,7 +81732,7 @@ index e587e68..705e8ea 100644
dev_put(dev);
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index d5617d4..e98ae9c 100644
index d5617d4..c70f2a2 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -268,6 +268,27 @@ static struct device_attribute net_class_attributes[] = {
@ -81731,7 +81795,17 @@ index d5617d4..e98ae9c 100644
dev->platform_data = net;
dev->groups = groups;
@@ -534,7 +562,15 @@ void netdev_initialize_kobject(struct net_device *net)
@@ -509,9 +537,6 @@ int netdev_register_kobject(struct net_device *net)
#endif
#endif /* CONFIG_SYSFS */
- if (dev_net(net) != &init_net)
- return 0;
-
return device_add(dev);
}
@@ -534,7 +559,15 @@ void netdev_initialize_kobject(struct net_device *net)
device_initialize(device);
}