[kernel] r16457 - in dists/sid/linux-2.6/debian: . patches/features/all/openvz patches/series
Ben Hutchings
benh at alioth.debian.org
Tue Oct 19 01:59:20 UTC 2010
Author: benh
Date: Tue Oct 19 01:59:00 2010
New Revision: 16457
Log:
[openvz] printk: Handle global log buffer reallocation (Closes: #600299)
Added:
dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz-printk-handle-global-log-buffer-realloc.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/26-extra
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Tue Oct 19 01:26:57 2010 (r16456)
+++ dists/sid/linux-2.6/debian/changelog Tue Oct 19 01:59:00 2010 (r16457)
@@ -18,6 +18,7 @@
(Closes: #600305)
* debian/.../patches.py: Open files as needed, rather than all at once
(Closes: #600423)
+ * [openvz] printk: Handle global log buffer reallocation (Closes: #600299)
[ dann frazier ]
* Force enable DMA on MBP w/ MCP 7,1
Added: dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz-printk-handle-global-log-buffer-realloc.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz-printk-handle-global-log-buffer-realloc.patch Tue Oct 19 01:59:00 2010 (r16457)
@@ -0,0 +1,37 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Subject: [PATCH] [openvz] printk: Handle global log buffer reallocation
+Date: Sun, 17 Oct 2010 02:24:28 +0100
+
+Currently an increase in log_buf_len results in disaster, as
+ve0.log_buf is left pointing to the old log buffer.
+
+Update ve0.log_buf when the global log buffer is reallocated. Also
+acquire logbuf_lock before reading ve_log_buf_len, to avoid a race
+with reallocation.
+
+Reported-and-tested-by: Tim Small <tim at seoss.co.uk>
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+--- a/kernel/printk.c
++++ b/kernel/printk.c
+@@ -198,6 +198,9 @@
+ spin_lock_irqsave(&logbuf_lock, flags);
+ log_buf_len = size;
+ log_buf = new_log_buf;
++#ifdef CONFIG_VE
++ ve0.log_buf = log_buf;
++#endif
+
+ offset = start = min(con_start, log_start);
+ dest_idx = 0;
+@@ -354,9 +357,9 @@
+ if (ve_log_buf == NULL)
+ goto out;
+ count = len;
++ spin_lock_irq(&logbuf_lock);
+ if (count > ve_log_buf_len)
+ count = ve_log_buf_len;
+- spin_lock_irq(&logbuf_lock);
+ if (count > ve_logged_chars)
+ count = ve_logged_chars;
+ if (do_clear)
Modified: dists/sid/linux-2.6/debian/patches/series/26-extra
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/26-extra Tue Oct 19 01:26:57 2010 (r16456)
+++ dists/sid/linux-2.6/debian/patches/series/26-extra Tue Oct 19 01:59:00 2010 (r16457)
@@ -1,6 +1,7 @@
+ debian/revert-tcp-Combat-per-cpu-skew-in-orphan-tests.patch featureset=openvz
+ features/all/openvz/openvz.patch featureset=openvz
+ features/all/openvz/cfq-iosched-do-not-force-idling-for-sync-workload.patch featureset=openvz
++ features/all/openvz/openvz-printk-handle-global-log-buffer-realloc.patch featureset=openvz
+ debian/revert-sched-2.6.32.22-changes.patch featureset=vserver
+ features/all/vserver/vs2.3.0.36.27.patch featureset=vserver
More information about the Kernel-svn-changes
mailing list