From patchwork Fri May 29 20:24:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 49240 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D802A218E7 for ; Fri, 29 May 2015 20:24:46 +0000 (UTC) Received: by wibbk2 with SMTP id bk2sf9350426wib.2 for ; Fri, 29 May 2015 13:24:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=5shPPlwoSxjzjYKV3nYyIpHL1HObOpEWHOOfrwUteQk=; b=HEU0HZLI2wK3SY58qxV6Pj5rnTIGcjBf8q0tkpsPVDKNNVuk289831snMprJtMQfBp Hc8np64a5BMjHz86stVIwmlsnzNMKv+NOIrADOQlCiFjSkzvF9P5yrMdIFOR9TrfuIPR dAzaNcP4b0RmaBbafcLg82ivZr+sJRXEcsI4GZhU460MXJclKuFVpk2qX1f0pptjkjZV Ft2lT9A0QpB6wid6+sECBd6DIsvi0sm+zSl/Q+/vXMlwwWdniW5Sgt0KWwWskDWeuDRo EdpytGIc+315cpa/MSVe7VogmnDHu8r/ZYoY+k3ggNWotbgrhacVYaQoPkKjFNHSklHV ZNnA== X-Gm-Message-State: ALoCoQnvnB7tLqh5cPo0861dxZomEdSLkKDQZ03OVWEm64m/IXPwjEaH+9/Y2NpbHnqG2U7pzvyT X-Received: by 10.180.97.9 with SMTP id dw9mr4366025wib.2.1432931086159; Fri, 29 May 2015 13:24:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.10 with SMTP id z10ls411532lae.24.gmail; Fri, 29 May 2015 13:24:46 -0700 (PDT) X-Received: by 10.152.8.231 with SMTP id u7mr9552754laa.37.1432931085993; Fri, 29 May 2015 13:24:45 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id w12si5538899lbf.159.2015.05.29.13.24.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 13:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbcmx3 with SMTP id mx3so55502490lbc.1 for ; Fri, 29 May 2015 13:24:45 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr9932642laa.106.1432931085607; Fri, 29 May 2015 13:24:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp615392lbb; Fri, 29 May 2015 13:24:44 -0700 (PDT) X-Received: by 10.70.88.170 with SMTP id bh10mr18121483pdb.62.1432931080345; Fri, 29 May 2015 13:24:40 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com. [209.85.220.50]) by mx.google.com with ESMTPS id 13si9906737pdb.141.2015.05.29.13.24.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 13:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.50 as permitted sender) client-ip=209.85.220.50; Received: by pacrp13 with SMTP id rp13so21364236pac.2 for ; Fri, 29 May 2015 13:24:39 -0700 (PDT) X-Received: by 10.70.140.108 with SMTP id rf12mr17800943pdb.140.1432931079442; Fri, 29 May 2015 13:24:39 -0700 (PDT) Received: from localhost.localdomain (c-71-63-136-39.hsd1.or.comcast.net. [71.63.136.39]) by mx.google.com with ESMTPSA id qs8sm6452549pbc.38.2015.05.29.13.24.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 May 2015 13:24:38 -0700 (PDT) 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> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;