aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Blank <waldi@debian.org>2007-03-31 20:42:54 +0000
committerBastian Blank <waldi@debian.org>2007-03-31 20:42:54 +0000
commitb492a218c4b922b36fa520a150534f6ebfc29ec5 (patch)
tree91342cbf7496d9b1dc0893f58a98d2e0fc7ff3af
parent06667c37d02328af1a5f2b463f8065b96a039819 (diff)
downloadkernel_replicant_linux-b492a218c4b922b36fa520a150534f6ebfc29ec5.tar.gz
kernel_replicant_linux-b492a218c4b922b36fa520a150534f6ebfc29ec5.tar.bz2
kernel_replicant_linux-b492a218c4b922b36fa520a150534f6ebfc29ec5.zip
* debian/changelog: Update.
* debian/patches/bugfix/all/vserver/cacct-overflow.patch, debian/patches/bugfix/all/vserver/locks.patch: Add. * debian/patches/series/13-extra: Add patches. svn path=/dists/etch/linux-2.6/; revision=8408
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/bugfix/all/vserver/cacct-overflow.patch57
-rw-r--r--debian/patches/bugfix/all/vserver/locks.patch30
-rw-r--r--debian/patches/series/13-extra2
4 files changed, 96 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index f0d82ce9e78d..27613f93dd1a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+linux-2.6 (2.6.18.dfsg.1-13) UNRELEASED; urgency=low
+
+ * [vserver] Fix overflow in network accounting. (closes: #412132)
+ * [vserver] Fix lock accouting.
+
+ -- Bastian Blank <waldi@debian.org> Sat, 31 Mar 2007 21:04:16 +0200
+
linux-2.6 (2.6.18.dfsg.1-12) unstable; urgency=low
[ Steve Langasek ]
diff --git a/debian/patches/bugfix/all/vserver/cacct-overflow.patch b/debian/patches/bugfix/all/vserver/cacct-overflow.patch
new file mode 100644
index 000000000000..b88dd2d6d60c
--- /dev/null
+++ b/debian/patches/bugfix/all/vserver/cacct-overflow.patch
@@ -0,0 +1,57 @@
+--- linux-2.6.16.43-vs2.0.3-rc1/include/linux/vs_socket.h 2007-03-28 02:23:16 +0200
++++ linux-2.6.16.43-vs2.0.3-rc2/include/linux/vs_socket.h 2007-03-17 16:20:04 +0100
+@@ -36,8 +36,8 @@ static inline void __vx_acc_sock(struct
+ if (vxi) {
+ int type = vx_sock_type(family);
+
+- atomic_inc(&vxi->cacct.sock[type][pos].count);
+- atomic_add(size, &vxi->cacct.sock[type][pos].total);
++ atomic_long_inc(&vxi->cacct.sock[type][pos].count);
++ atomic_long_add(size, &vxi->cacct.sock[type][pos].total);
+ }
+ }
+
+--- linux-2.6.16.43-vs2.0.3-rc1/include/linux/vserver/cvirt_def.h 2007-03-28 02:23:16 +0200
++++ linux-2.6.16.43-vs2.0.3-rc2/include/linux/vserver/cvirt_def.h 2007-03-17 16:20:04 +0100
+@@ -62,8 +62,8 @@ struct _vx_cvirt {
+ };
+
+ struct _vx_sock_acc {
+- atomic_t count;
+- atomic_t total;
++ atomic_long_t count;
++ atomic_long_t total;
+ };
+
+ /* context sub struct */
+--- linux-2.6.16.43-vs2.0.3-rc1/kernel/vserver/cvirt_init.h 2007-03-28 02:23:17 +0200
++++ linux-2.6.16.43-vs2.0.3-rc2/kernel/vserver/cvirt_init.h 2007-03-17 16:20:04 +0100
+@@ -68,8 +68,8 @@ static inline void vx_info_init_cacct(st
+
+ for (i=0; i<5; i++) {
+ for (j=0; j<3; j++) {
+- atomic_set(&cacct->sock[i][j].count, 0);
+- atomic_set(&cacct->sock[i][j].total, 0);
++ atomic_long_set(&cacct->sock[i][j].count, 0);
++ atomic_long_set(&cacct->sock[i][j].total, 0);
+ }
+ }
+ }
+--- linux-2.6.16.43-vs2.0.3-rc1/kernel/vserver/cvirt_proc.h 2007-03-28 02:23:17 +0200
++++ linux-2.6.16.43-vs2.0.3-rc2/kernel/vserver/cvirt_proc.h 2007-03-17 16:20:04 +0100
+@@ -58,13 +58,13 @@ static inline int vx_info_proc_cvirt(str
+
+ static inline long vx_sock_count(struct _vx_cacct *cacct, int type, int pos)
+ {
+- return atomic_read(&cacct->sock[type][pos].count);
++ return atomic_long_read(&cacct->sock[type][pos].count);
+ }
+
+
+ static inline long vx_sock_total(struct _vx_cacct *cacct, int type, int pos)
+ {
+- return atomic_read(&cacct->sock[type][pos].total);
++ return atomic_long_read(&cacct->sock[type][pos].total);
+ }
+
+ static inline int vx_info_proc_cacct(struct _vx_cacct *cacct, char *buffer)
diff --git a/debian/patches/bugfix/all/vserver/locks.patch b/debian/patches/bugfix/all/vserver/locks.patch
new file mode 100644
index 000000000000..f303d4170d39
--- /dev/null
+++ b/debian/patches/bugfix/all/vserver/locks.patch
@@ -0,0 +1,30 @@
+--- linux-2.6.16.43-vs2.0.3-rc1/fs/locks.c 2007-03-28 02:23:15 +0200
++++ linux-2.6.16.43-vs2.0.3-rc2/fs/locks.c 2007-03-17 16:20:04 +0100
+@@ -759,6 +759,7 @@ static int flock_lock_file(struct file *
+ new_fl = locks_alloc_lock();
+ if (new_fl == NULL)
+ goto out;
++ new_fl->fl_xid = -1;
+ /*
+ * If a higher-priority process was blocked on the old file lock,
+ * give it the opportunity to lock the file.
+@@ -780,8 +781,8 @@ static int flock_lock_file(struct file *
+ if (request->fl_flags & FL_ACCESS)
+ goto out;
+ locks_copy_lock(new_fl, request);
+- vx_locks_inc(new_fl);
+ locks_insert_lock(&inode->i_flock, new_fl);
++ vx_locks_inc(new_fl);
+ new_fl = NULL;
+ error = 0;
+
+@@ -1383,8 +1384,8 @@ static int __setlease(struct file *filp,
+ goto out;
+
+ locks_copy_lock(fl, lease);
+-
+ locks_insert_lock(before, fl);
++ vx_locks_inc(fl);
+
+ *flp = fl;
+ error = 0;
diff --git a/debian/patches/series/13-extra b/debian/patches/series/13-extra
new file mode 100644
index 000000000000..752fcac9cec6
--- /dev/null
+++ b/debian/patches/series/13-extra
@@ -0,0 +1,2 @@
++ bugfix/all/vserver/cacct-overflow.patch *_vserver *_xen-vserver
++ bugfix/all/vserver/locks.patch *_vserver *_xen-vserver