From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757328AbbE2UY4 (ORCPT ); Fri, 29 May 2015 16:24:56 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35455 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757298AbbE2UYj (ORCPT ); Fri, 29 May 2015 16:24:39 -0400 From: John Stultz To: lkml Cc: John Stultz , Prarit Bhargava , Daniel Bristot de Oliveira , Richard Cochran , Jan Kara , Jiri Bohac , Thomas Gleixner , Ingo Molnar , Shuah Khan Subject: [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path Date: Fri, 29 May 2015 13:24:27 -0700 Message-Id: <1432931068-4980-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432931068-4980-1-git-send-email-john.stultz@linaro.org> References: <1432931068-4980-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 Cc: Daniel Bristot de Oliveira Cc: Richard Cochran Cc: Jan Kara Cc: Jiri Bohac Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Shuah Khan Signed-off-by: John Stultz --- 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