aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-07-20 18:35:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-07-20 18:35:54 +0000
commitbb141e06a27e18d605b64d2d3cab135693896682 (patch)
treef399f0792a0c9a6a6bf2fa04cfd85d771d07bfd9 /target/linux
parenta0129dfd8e0d3de96155a40767f9853079957a6b (diff)
downloadupstream-bb141e06a27e18d605b64d2d3cab135693896682.tar.gz
upstream-bb141e06a27e18d605b64d2d3cab135693896682.tar.bz2
upstream-bb141e06a27e18d605b64d2d3cab135693896682.zip
kernel: merge a proposed fix from LKML for fixing infinite data returned by /proc/timer_list
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37484
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/patches-3.10/030-timer_list_fix.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/030-timer_list_fix.patch b/target/linux/generic/patches-3.10/030-timer_list_fix.patch
new file mode 100644
index 0000000000..ef3c7988fd
--- /dev/null
+++ b/target/linux/generic/patches-3.10/030-timer_list_fix.patch
@@ -0,0 +1,45 @@
+Patch by: Nathan Zimmer <nzimmer@sgi.com>
+
+Fixes a regression in the commit
+"timer_list: Convert timer list to be a proper seq_file" which causes
+/proc/timer_list to return an infinite amount of data
+
+
+--- a/kernel/time/timer_list.c
++++ b/kernel/time/timer_list.c
+@@ -305,24 +305,26 @@ static void *timer_list_start(struct seq
+ if (!*offset) {
+ iter->cpu = -1;
+ iter->now = ktime_to_ns(ktime_get());
+- } else if (iter->cpu >= nr_cpu_ids) {
++ } else {
++ iter->cpu = cpumask_next(iter->cpu, cpu_online_mask);
++ if (iter->cpu >= nr_cpu_ids) {
+ #ifdef CONFIG_GENERIC_CLOCKEVENTS
+- if (!iter->second_pass) {
+- iter->cpu = -1;
+- iter->second_pass = true;
+- } else
+- return NULL;
++ if (!iter->second_pass) {
++ iter->cpu = -1;
++ iter->second_pass = true;
++ } else
++ return NULL;
+ #else
+- return NULL;
++ return NULL;
+ #endif
++ }
+ }
++
+ return iter;
+ }
+
+ static void *timer_list_next(struct seq_file *file, void *v, loff_t *offset)
+ {
+- struct timer_list_iter *iter = file->private;
+- iter->cpu = cpumask_next(iter->cpu, cpu_online_mask);
+ ++*offset;
+ return timer_list_start(file, offset);
+ }