From: Nathan Zimmer <nzimmer@sgi.com>
To: linux-kernel@vger.kernel.org, holger@freyther.de
Cc: Nathan Zimmer <nzimmer@sgi.com>, <stable@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH] timer_list: Correct the show function for timer_list by using iter->now
Date: Mon, 22 Jul 2013 16:18:31 -0500 [thread overview]
Message-ID: <1374527911-43084-1-git-send-email-nzimmer@sgi.com> (raw)
In-Reply-To: <20130720054300.GA29718@xiaoyu.lan>
This patch corrects the issue with /proc/timer_list reported by Holger.
When reading from the proc file with a sufficently small buffer, 2k so not
really that small, there was one could get hung trying to read the file a
chunk at a time.
Signed-off-by Nathan Zimmer <nzimmer@sgi.com>
Reported-by: Holger Hans Peter Freyther <holger@freyther.de>
Cc: <stable@vger.kernel.org> # 3.10.x
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/timer_list.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index 3bdf283..08d7fbd 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -265,10 +265,9 @@ static inline void timer_list_header(struct seq_file *m, u64 now)
static int timer_list_show(struct seq_file *m, void *v)
{
struct timer_list_iter *iter = v;
- u64 now = ktime_to_ns(ktime_get());
if (iter->cpu == -1 && !iter->second_pass)
- timer_list_header(m, now);
+ timer_list_header(m, iter->now);
else if (!iter->second_pass)
print_cpu(m, iter->cpu, iter->now);
#ifdef CONFIG_GENERIC_CLOCKEVENTS
--
1.8.2.1
next prev parent reply other threads:[~2013-07-22 21:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 15:28 /proc/timer_list and weird behavior with dropbear Holger Hans Peter Freyther
2013-07-19 15:45 ` Nathan Zimmer
2013-07-19 17:03 ` Holger Hans Peter Freyther
2013-07-19 19:05 ` Nathan Zimmer
2013-07-19 20:33 ` Nathan Zimmer
2013-07-19 20:37 ` Nathan Zimmer
2013-07-20 5:43 ` Holger Hans Peter Freyther
2013-07-22 21:18 ` Nathan Zimmer [this message]
2013-07-23 7:18 ` [PATCH] timer_list: Correct the show function for timer_list by using iter->now Holger Hans Peter Freyther
2013-07-23 22:50 ` Nathan Zimmer
2013-07-24 14:31 ` [PATCH] timer_list: Correct the iterator for timer_list Nathan Zimmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374527911-43084-1-git-send-email-nzimmer@sgi.com \
--to=nzimmer@sgi.com \
--cc=holger@freyther.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®