[kernel] r13382 - in dists/lenny/linux-2.6/debian: . patches/features/all/openvz patches/series

Maximilian Attems maks at alioth.debian.org
Thu Apr 9 15:02:58 UTC 2009


Author: maks
Date: Thu Apr  9 15:02:55 2009
New Revision: 13382

Log:
openvz add several upstream stable patches

this serie are selected non ABI breaker from 0076-0083.

Added:
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0076-cfq-link-cfq_bc_data-without-bc-io-sched.patch
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0077-cfq-revalidate-cached-async-queue.patch
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0078-VE-fix-idle-time-accounting.patch
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0079-ptrace-ban-ptracing-of-a-container-init-from-inside.patch
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0081-ubc-uncharging-too-much-for-TCPSNDBUF.patch
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0082-ve-show-task-s-vpid-and-veid-even-inside-a-containe.patch
Modified:
   dists/lenny/linux-2.6/debian/changelog
   dists/lenny/linux-2.6/debian/patches/series/16-extra

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	Thu Apr  9 07:20:06 2009	(r13381)
+++ dists/lenny/linux-2.6/debian/changelog	Thu Apr  9 15:02:55 2009	(r13382)
@@ -3,6 +3,13 @@
   * [openvz] 5dcfcf5 NETLINK: disable netns broadcast filtering.
     (closes: #520551)
   * Fix SQLite performance regression. (closes: #521420)
+  * [openvz] 0c295ff cfq link cfq_bc_data without bc io sched.
+  * [openvz] 7e0f90d cfq: revalidate cached async queue.
+  * [openvz] e4cea21 VE: fix idle time accounting.
+  * [openvz] 19b8e13 ptrace: ban ptracing of a container init from inside the
+    container.
+  * [openvz] 5b58141 ubc: uncharging too much for TCPSNDBUF.
+  * [openvz] 0ff728e ve: show task's vpid and veid even inside a container.
 
  -- maximilian attems <maks at debian.org>  Mon, 30 Mar 2009 17:11:49 +0200
 

Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0076-cfq-link-cfq_bc_data-without-bc-io-sched.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0076-cfq-link-cfq_bc_data-without-bc-io-sched.patch	Thu Apr  9 15:02:55 2009	(r13382)
@@ -0,0 +1,32 @@
+From 0c295ff25ec9af8ecca813bc4809d83c8d93ef19 Mon Sep 17 00:00:00 2001
+From: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Date: Fri, 27 Mar 2009 14:59:14 +0300
+Subject: [PATCH 76/82] cfq link cfq_bc_data without bc io sched
+
+Fixes oops at first IO with CONFIG_BC_IO_SCHED=n.
+
+The cfq_set_request wants to get ub by cfqq->cfq_bc->ub_iopriv,
+so save ref to ub0 there.
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ block/cfq-iosched.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
+index 497b791..264a086 100644
+--- a/block/cfq-iosched.c
++++ b/block/cfq-iosched.c
+@@ -2163,6 +2163,8 @@ static void *cfq_init_queue(struct request_queue *q)
+ 	INIT_LIST_HEAD(&cfqd->act_cfq_bc_head);
+ #ifndef CONFIG_BC_IO_SCHED
+ 	cfq_init_cfq_bc(&cfqd->cfq_bc);
++	cfqd->cfq_bc.cfqd = cfqd;
++	cfqd->cfq_bc.ub_iopriv = &ub0.iopriv;
+ 	/*
+ 	 *  Adding ub0 to active list in order to serve force dispatching
+ 	 *  case uniformally. Note, that nobody removes ub0 from this list.
+-- 
+1.6.2.2
+

Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0077-cfq-revalidate-cached-async-queue.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0077-cfq-revalidate-cached-async-queue.patch	Thu Apr  9 15:02:55 2009	(r13382)
@@ -0,0 +1,111 @@
+From 7e0f90d2f2d221e66d64e61ee3c4b3b83c2545de Mon Sep 17 00:00:00 2001
+From: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Date: Fri, 27 Mar 2009 15:01:41 +0300
+Subject: [PATCH 77/82] cfq: revalidate cached async queue
+
+Async queues are stored on struct cfq_bc_data
+and are cached on per-process struct cfq_io_context.
+
+The cached queue may be invalid due to io_page beancounter
+driven io-context switch.
+
+So, cfq_io_context gets cached queue, but corresponding
+cfq_bc and user_beancounter may be already destroyed -- all
+this leads to oops at get_beancounter in cfq_set_request.
+
+Add check for async queue owner and refill cache if it invalid.
+
+The oops itself is like this:
+
+BUG: unable to handle kernel paging request at ffffffffffffff20
+IP: [<ffffffff81108f48>] cfq_set_request+0x362/0x3ef
+PGD 203067 PUD 204067 PMD 0
+Oops: 0002 [1] SMP
+CPU: 1
+Modules linked in: vzcpt tun simfs vzethdev vznetdev vzdquota vzmon vzdev ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables ipv6 bridge stp k8temp button shpchp amd_rng hwmon i2c_amd8111 i2c_amd756 i2c_core pcspkr ext3 jbd mbcache sg sr_mod cdrom sd_mod pata_acpi ata_generic sata_sil ohci_hcd pata_amd aic79xx scsi_transport_spi libata scsi_mod dm_mirror dm_log dm_snapshot dm_mod netconsole configfs tg3 libphy
+Pid: 210, comm: pdflush Not tainted 2.6.27-briullov.1 #1 briullov
+RIP: 0010:[<ffffffff81108f48>]  [<ffffffff81108f48>] cfq_set_request+0x362/0x3ef
+RSP: 0018:ffff88003f5f5890  EFLAGS: 00010297
+RAX: 0000000000000000 RBX: ffff88007f912630 RCX: 0000000000000001
+RDX: ffff88003dde0000 RSI: 0000000000000286 RDI: ffff88003dde0230
+RBP: ffff88007f902b28 R08: 0000000000000000 R09: ffff88007dcd1690
+R10: 0000000000000001 R11: ffffffff81108be6 R12: 0000000000000286
+R13: ffff88003e0ddc00 R14: 0000000000000001 R15: 0000000000000010
+FS:  00007f5db3cb66e0(0000) GS:ffff88007f633200(0000) knlGS:00000000b7de16c0
+CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
+CR2: ffffffffffffff20 CR3: 0000000076101000 CR4: 00000000000006a0
+DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
+Process pdflush (pid: 210, veid=0, threadinfo ffff88003f5f4000, task ffff88003fef0ea0)
+Stack:  ffff88007f902b28 ffff88003e0dde00 0000000100000000 ffff88007dcd1690
+ ffff88003dde0000 ffff88007dcd1690 ffff88003dde0000 0000000000000001
+ ffff88003dde0020 0000000000000001 0000000000000000 ffffffff810fd08b
+Call Trace:
+ [<ffffffff810fd08b>] ? get_request+0x252/0x35e
+ [<ffffffff810fd1cb>] ? get_request_wait+0x34/0x16d
+ [<ffffffffa0037abe>] ? __split_bio+0x3ea/0x3fd [dm_mod]
+ [<ffffffff81108506>] ? cfq_insert_request+0x5d/0x32e
+ [<ffffffff810fe638>] ? __make_request+0x352/0x3da
+ [<ffffffff810fd8b8>] ? generic_make_request+0x2f6/0x331
+ [<ffffffff8106d1d2>] ? mempool_alloc+0x3c/0xf4
+ [<ffffffff810fda2e>] ? submit_bio+0x13b/0x146
+ [<ffffffff810b92a6>] ? submit_bh+0xd5/0xf6
+ [<ffffffff810b9d18>] ? __block_write_full_page+0x1a5/0x28e
+ [<ffffffffa013ee5a>] ? ext3_get_block+0x0/0x102 [ext3]
+ [<ffffffffa013ce03>] ? ext3_ordered_writepage+0xba/0x134 [ext3]
+ [<ffffffff81071a98>] ? __writepage+0xa/0x21
+ [<ffffffff810720dd>] ? write_cache_pages+0x216/0x347
+ [<ffffffff81071a8e>] ? __writepage+0x0/0x21
+ [<ffffffff81264c90>] ? thread_return+0x3e/0xfe
+ [<ffffffff810483e5>] ? getnstimeofday+0x51/0xaf
+ [<ffffffff81072251>] ? do_writepages+0x27/0x2d
+ [<ffffffff810b4bf7>] ? __writeback_single_inode+0x15c/0x2c9
+ [<ffffffff8102cc69>] ? update_curr+0x40/0x7c
+ [<ffffffff8102cfc9>] ? dequeue_entity+0x6f/0x9f
+ [<ffffffff81025066>] ? __dequeue_entity+0x1f/0x64
+ [<ffffffffa0039b6b>] ? dm_table_any_congested+0x12/0x65 [dm_mod]
+ [<ffffffff810b4f33>] ? generic_sync_sb_inodes+0x1cf/0x312
+ [<ffffffff81072505>] ? pdflush+0x0/0x1f3
+ [<ffffffff810b50e4>] ? writeback_inodes+0x69/0xa2
+ [<ffffffff81071808>] ? background_writeout+0x7a/0xb5
+ [<ffffffff8107264a>] ? pdflush+0x145/0x1f3
+ [<ffffffff8107178e>] ? background_writeout+0x0/0xb5
+ [<ffffffff81042df7>] ? kthread+0x94/0xbb
+ [<ffffffff8100cea9>] ? child_rip+0xa/0x11
+ [<ffffffff81042d63>] ? kthread+0x0/0xbb
+ [<ffffffff8100ce9f>] ? child_rip+0x0/0x11
+
+Code: e8 23 d6 15 00 48 8b 44 24 18 48 89 a8 90 00 00 00 48 89 98 98 00 00 00 48 8b 83 88 00 00 00 48 8b 40 28 48 3d e8 00 00 00 74 07 <f0> ff 80 20 ff ff ff 31 c0 eb 73 48 85 ed 74 09 48 8b 7d 20 e8
+RIP  [<ffffffff81108f48>] cfq_set_request+0x362/0x3ef
+ RSP <ffff88003f5f5890>
+CR2: ffffffffffffff20
+---[ end trace f8088dc30c5423c2 ]---
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ block/cfq-iosched.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
+index 264a086..b25b442 100644
+--- a/block/cfq-iosched.c
++++ b/block/cfq-iosched.c
+@@ -2038,6 +2038,14 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
+ 		cic_set_cfqq(cic, cfqq, is_sync);
+ 	}
+ 
++	if (!is_sync && cfqq->cfq_bc != cfq_bc) {
++		cfq_put_queue(cfqq);
++		cfqq = cfq_get_queue(cfqd, is_sync, cic->ioc, gfp_mask);
++		cic_set_cfqq(cic, cfqq, is_sync);
++		if (!cfqq)
++			goto queue_fail;
++	}
++
+ 	cfqq->allocated[rw]++;
+ 	cfq_clear_cfqq_must_alloc(cfqq);
+ 	atomic_inc(&cfqq->ref);
+-- 
+1.6.2.2
+

Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0078-VE-fix-idle-time-accounting.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0078-VE-fix-idle-time-accounting.patch	Thu Apr  9 15:02:55 2009	(r13382)
@@ -0,0 +1,33 @@
+From e4cea21b5f5da00cbd4b589ab5f849404ce4987a Mon Sep 17 00:00:00 2001
+From: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Date: Fri, 27 Mar 2009 15:03:57 +0300
+Subject: [PATCH 78/82] VE: fix idle time accounting
+
+Make both account ways simmetic: idle time accounted as idle or iowait,
+depending on number tasks in iowait state.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1217
+(#114633)
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ kernel/sched.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/kernel/sched.c b/kernel/sched.c
+index 2a86a05..22942a3 100644
+--- a/kernel/sched.c
++++ b/kernel/sched.c
+@@ -1026,7 +1026,7 @@ cycles_t ve_sched_get_idle_time(struct ve_struct *ve, int cpu)
+ 		v = read_seqcount_begin(&ve_stat->stat_lock);
+ 		ret = ve_stat->idle_time;
+ 		strt = ve_stat->strt_idle_time;
+-		if (strt && nr_uninterruptible_ve(ve) == 0) {
++		if (strt && nr_iowait_ve(ve) == 0) {
+ 			cycles = get_cycles();
+ 			if (cycles_after(cycles, strt))
+ 				ret += cycles - strt;
+-- 
+1.6.2.2
+

Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0079-ptrace-ban-ptracing-of-a-container-init-from-inside.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0079-ptrace-ban-ptracing-of-a-container-init-from-inside.patch	Thu Apr  9 15:02:55 2009	(r13382)
@@ -0,0 +1,37 @@
+From 19b8e134c0d9a9654404c04ae15c958f40efa706 Mon Sep 17 00:00:00 2001
+From: Pavel Emelyanov <xemul at openvz.org>
+Date: Fri, 3 Apr 2009 17:13:14 +0400
+Subject: [PATCH 79/82] ptrace: ban ptracing of a container init from inside the container
+
+Current ptrace engine suffers from strange problems, one of which
+is described in bug #1222 - init results in T state after incorrect
+tracer detach.
+
+Fixing it is not that easy, but since ptracing init was never alowed
+before it's OK to ban this (for a while?).
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1222
+
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ kernel/ptrace.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c
+index df8f075..2db201b 100644
+--- a/kernel/ptrace.c
++++ b/kernel/ptrace.c
+@@ -530,6 +530,10 @@ struct task_struct *ptrace_get_task_struct(pid_t pid)
+ {
+ 	struct task_struct *child;
+ 
++	/* ptracing of init from inside CT is dangerous */
++	if (pid == 1 && !capable(CAP_SYS_ADMIN))
++		return ERR_PTR(-EPERM);
++
+ 	read_lock(&tasklist_lock);
+ 	child = find_task_by_vpid(pid);
+ 	if (child)
+-- 
+1.6.2.2
+

Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0081-ubc-uncharging-too-much-for-TCPSNDBUF.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0081-ubc-uncharging-too-much-for-TCPSNDBUF.patch	Thu Apr  9 15:02:55 2009	(r13382)
@@ -0,0 +1,37 @@
+From 5b58141396d03305e9db380648800da19ac5d960 Mon Sep 17 00:00:00 2001
+From: Denis V. Lunev <den at openvz.org>
+Date: Mon, 14 Jul 2008 11:04:29 +0400
+Subject: [PATCH 81/82] ubc: uncharging too much for TCPSNDBUF
+
+It is not allowed to go to the label wait_for_memory with chargesize != 0
+when this space is already placed to the skb.
+
+Signed-off-by: Denis V. Lunev <den at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ net/ipv4/tcp.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
+index 56f3de7..a68ebd3 100644
+--- a/net/ipv4/tcp.c
++++ b/net/ipv4/tcp.c
+@@ -723,6 +723,7 @@ new_segment:
+ 			if (!skb)
+ 				goto wait_for_memory;
+ 			ub_skb_set_charge(skb, sk, chargesize, UB_TCPSNDBUF);
++			chargesize = 0;
+ 
+ 			skb_entail(sk, skb);
+ 			copy = size_goal;
+@@ -915,6 +916,7 @@ new_segment:
+ 					goto wait_for_memory;
+ 				ub_skb_set_charge(skb, sk, chargesize,
+ 						UB_TCPSNDBUF);
++				chargesize = 0;
+ 
+ 				/*
+ 				 * Check whether we can use HW checksum.
+-- 
+1.6.2.2
+

Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0082-ve-show-task-s-vpid-and-veid-even-inside-a-containe.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0082-ve-show-task-s-vpid-and-veid-even-inside-a-containe.patch	Thu Apr  9 15:02:55 2009	(r13382)
@@ -0,0 +1,75 @@
+From 0ff728ef0d9d23987bb9b4e79772fda6fb466aef Mon Sep 17 00:00:00 2001
+From: Pavel Emelyanov <xemul at openvz.org>
+Date: Fri, 3 Apr 2009 17:59:56 +0400
+Subject: [PATCH 82/82] ve: show task's vpid and veid even inside a container
+
+Getting task real virtual :) pid is tricky in 2.6.26 and above...
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1223
+http://bugzilla.openvz.org/show_bug.cgi?id=1224
+
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ fs/proc/array.c |   26 ++++++++++++++++++--------
+ 1 files changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/fs/proc/array.c b/fs/proc/array.c
+index 39fa215..9e42b20 100644
+--- a/fs/proc/array.c
++++ b/fs/proc/array.c
+@@ -159,19 +159,33 @@ static inline const char *get_task_state(struct task_struct *tsk)
+ 	return *p;
+ }
+ 
++static int task_virtual_pid(struct task_struct *t)
++{
++	struct pid *pid;
++
++	pid = task_pid(t);
++	/*
++	 * this will give wrong result for tasks,
++	 * that failed to enter VE, but that's OK
++	 */
++	return pid ? pid->numbers[pid->level].nr : 0;
++}
++
+ static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
+ 				struct pid *pid, struct task_struct *p)
+ {
+ 	struct group_info *group_info;
+ 	int g;
+ 	struct fdtable *fdt = NULL;
+-	pid_t ppid, tpid;
++	pid_t ppid, tpid, vpid;
+ 
+ 	rcu_read_lock();
+ 	ppid = pid_alive(p) ?
+ 		task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0;
+ 	tpid = pid_alive(p) && p->ptrace ?
+ 		task_pid_nr_ns(rcu_dereference(p->parent), ns) : 0;
++	vpid = task_virtual_pid(p);
++
+ 	seq_printf(m,
+ 		"State:\t%s\n"
+ 		"Tgid:\t%d\n"
+@@ -206,14 +220,10 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
+ 
+ 	seq_printf(m, "\n");
+ 
+-#ifdef CONFIG_VE
+-	if (ve_is_super(get_exec_env())) {
+-		seq_printf(m, "envID:\t%d\nVPid:\t%d\n",
+-			p->ve_task_info.owner_env->veid, task_pid_vnr(p));
+-		seq_printf(m, "PNState:\t%u\nStopState:\t%u\n",
++	seq_printf(m, "envID:\t%d\nVPid:\t%d\n",
++			p->ve_task_info.owner_env->veid, vpid);
++	seq_printf(m, "PNState:\t%u\nStopState:\t%u\n",
+ 			p->pn_state, p->stopped_state);
+-	}
+-#endif
+ }
+ 
+ static void render_sigset_t(struct seq_file *m, const char *header,
+-- 
+1.6.2.2
+

Modified: dists/lenny/linux-2.6/debian/patches/series/16-extra
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/16-extra	Thu Apr  9 07:20:06 2009	(r13381)
+++ dists/lenny/linux-2.6/debian/patches/series/16-extra	Thu Apr  9 15:02:55 2009	(r13382)
@@ -1 +1,7 @@
 + features/all/openvz/0074-NETLINK-disable-netns-broadcast-filtering.patch featureset=openvz
++ features/all/openvz/0076-cfq-link-cfq_bc_data-without-bc-io-sched.patch featureset=openvz
++ features/all/openvz/0077-cfq-revalidate-cached-async-queue.patch featureset=openvz
++ features/all/openvz/0078-VE-fix-idle-time-accounting.patch featureset=openvz
++ features/all/openvz/0079-ptrace-ban-ptracing-of-a-container-init-from-inside.patch featureset=openvz
++ features/all/openvz/0081-ubc-uncharging-too-much-for-TCPSNDBUF.patch featureset=openvz
++ features/all/openvz/0082-ve-show-task-s-vpid-and-veid-even-inside-a-containe.patch featureset=openvz



More information about the Kernel-svn-changes mailing list