From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Prarit Bhargava <prarit@redhat.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Jan Kara <jack@suse.cz>, Jiri Bohac <jbohac@suse.cz>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Shuah Khan <shuahkh@osg.samsung.com>
Subject: [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path
Date: Fri, 29 May 2015 13:24:27 -0700 [thread overview]
Message-ID: <1432931068-4980-4-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <1432931068-4980-1-git-send-email-john.stultz@linaro.org>
Looking over the leapsecond code, I noticed the printk messages
reporting the leapsecond insertion in the second_overflow path
were not using the printk_deferred method. This was surprising
since the printk_deferred method was added in part to avoid
printk-ing while holding the timekeeping locks.
See 6d9bcb621b0b (timekeeping: use printk_deferred when holding
timekeeping seqlock) for further rational.
I can only guess that this omission was a git add -p oversight.
Folks particularly worried about leapsecond crashes should
probably pay attention to this patch. Pending review, Its likely
a -stable candidate.
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
kernel/time/ntp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 7a68100..472591e 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -393,7 +393,7 @@ int second_overflow(unsigned long secs)
else if (secs % 86400 == 0) {
leap = -1;
time_state = TIME_OOP;
- printk(KERN_NOTICE
+ printk_deferred(KERN_NOTICE
"Clock: inserting leap second 23:59:60 UTC\n");
}
break;
@@ -403,7 +403,7 @@ int second_overflow(unsigned long secs)
else if ((secs + 1) % 86400 == 0) {
leap = 1;
time_state = TIME_WAIT;
- printk(KERN_NOTICE
+ printk_deferred(KERN_NOTICE
"Clock: deleting leap second 23:59:59 UTC\n");
}
break;
--
1.9.1
next prev parent reply other threads:[~2015-05-29 20:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 20:24 [RFC][PATCH 0/4] Fixes for leapsecond expiring early ABS_TIME CLOCK_REALTIME timers John Stultz
2015-05-29 20:24 ` [RFC][PATCH 1/4] selftests: timers: Add leap-second timer edge testing to leap-a-day.c John Stultz
2015-05-29 20:24 ` [RFC][PATCH 2/4] timer_list: Add the base offset so remaining nsecs are accurate for non monotonic timers John Stultz
2015-05-29 20:24 ` John Stultz [this message]
2015-06-02 10:31 ` [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path Jiri Bohac
2015-06-02 10:43 ` Jiri Kosina
2015-06-02 16:14 ` John Stultz
2015-06-02 16:04 ` John Stultz
2015-05-29 20:24 ` [RFC][PATCH 4/4] time: Do leapsecond adjustment in gettime fastpaths John Stultz
2015-05-31 16:05 ` Richard Cochran
2015-06-02 9:01 ` Ingo Molnar
2015-06-02 9:21 ` Peter Zijlstra
2015-06-02 14:09 ` John Stultz
2015-06-02 15:52 ` John Stultz
2015-06-03 9:04 ` Ingo Molnar
2015-06-03 17:44 ` John Stultz
2015-06-04 6:48 ` Ingo Molnar
2015-06-05 0:08 ` John Stultz
2015-06-05 7:29 ` Peter Zijlstra
2015-06-05 9:04 ` Richard Cochran
2015-06-05 9:10 ` Peter Zijlstra
2015-06-05 14:12 ` Richard Cochran
2015-06-05 17:28 ` John Stultz
2015-06-06 9:44 ` Thomas Gleixner
2015-06-08 17:55 ` John Stultz
2015-06-08 19:05 ` Thomas Gleixner
2015-06-08 20:02 ` Thomas Gleixner
2015-06-05 11:37 ` Prarit Bhargava
2015-06-05 12:07 ` Thomas Gleixner
2015-06-05 14:22 ` Richard Cochran
2015-06-05 17:24 ` John Stultz
2015-05-31 13:55 ` [RFC][PATCH 0/4] Fixes for leapsecond expiring early ABS_TIME CLOCK_REALTIME timers Prarit Bhargava
2015-06-01 11:57 ` Prarit Bhargava
2015-06-01 17:02 ` John Stultz
2015-06-01 17:43 ` Prarit Bhargava
2015-06-01 20:18 ` Daniel Bristot de Oliveira
2015-06-01 20:32 ` John Stultz
2015-06-01 21:42 ` Prarit Bhargava
2015-06-01 22:29 ` Daniel Bristot de Oliveira
2015-06-02 6:19 ` John Stultz
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=1432931068-4980-4-git-send-email-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=bristot@redhat.com \
--cc=jack@suse.cz \
--cc=jbohac@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=prarit@redhat.com \
--cc=richardcochran@gmail.com \
--cc=shuahkh@osg.samsung.com \
--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;
as well as URLs for NNTP newsgroup(s).