From patchwork Fri May 2 22:09:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 29599 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8C034206A5 for ; Fri, 2 May 2014 22:09:31 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id a41sf10122303yho.1 for ; Fri, 02 May 2014 15:09:31 -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=5Z3TllOVBdolbZi+NK+kYAk0kRbCMVD56MtVEWeCDNs=; b=AGbfUBsDH/pe2LeNjfAF8HwivovNR44XMn6ByRHbPSfuiByJw5HMlTlT1vk9gy3pO6 in/f4oWl6G5pNQKzgvCiunh1wiM1GPVIRDjAZ0SW91N5FcdMnKmI9FcGD6+/u25drNGZ PoJcKgdSfFE+wG6Zl5pO6DxqL7aFtzGV1ycC7Y0wOZqiyEVO+U6nyHKdT7Rdjnq1GgRe 02XgEQE8TEsTPl6dqjQZ4xwnM+vXxu8xQ8X56c9wqbo7GJ9K4XCDAzd7kYPlIgi88kC/ 7xrulW+zvr2Nr8pP8M8jseVUAxPfp1nBFQ+72zMEw+u391/58jk7KCti3E55qayk78RJ MVUA== X-Gm-Message-State: ALoCoQmimAT/fXAUSyg+IRUreCWAMxHt8o3WR3SS1Gwgf/NK/tShSLCQ9ouvXIVM+EAYui292PsA X-Received: by 10.236.209.130 with SMTP id s2mr8693935yho.18.1399068570972; Fri, 02 May 2014 15:09:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.106 with SMTP id 97ls1729779qgo.34.gmail; Fri, 02 May 2014 15:09:30 -0700 (PDT) X-Received: by 10.52.166.102 with SMTP id zf6mr12329033vdb.2.1399068570811; Fri, 02 May 2014 15:09:30 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id b5si61819vej.83.2014.05.02.15.09.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 15:09:30 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so2613915veb.11 for ; Fri, 02 May 2014 15:09:30 -0700 (PDT) X-Received: by 10.52.34.4 with SMTP id v4mr1198951vdi.42.1399068570674; Fri, 02 May 2014 15:09:30 -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.220.221.72 with SMTP id ib8csp134361vcb; Fri, 2 May 2014 15:09:30 -0700 (PDT) X-Received: by 10.66.227.193 with SMTP id sc1mr39821545pac.102.1399068569661; Fri, 02 May 2014 15:09:29 -0700 (PDT) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id yd10si240798pab.330.2014.05.02.15.09.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 15:09:29 -0700 (PDT) Received-SPF: none (google.com: john.stultz@linaro.org does not designate permitted sender hosts) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id w10so3926956pde.12 for ; Fri, 02 May 2014 15:09:29 -0700 (PDT) X-Received: by 10.66.136.131 with SMTP id qa3mr39204657pab.77.1399068568942; Fri, 02 May 2014 15:09:28 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id nw13sm1693724pab.37.2014.05.02.15.09.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 May 2014 15:09:28 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , Jan Kara , Peter Zijlstra , Jiri Bohac , Thomas Gleixner , Ingo Molnar , Andrew Morton , Steven Rostedt Subject: [PATCH 1/4] printk: Re-add irqsave/restore in printk_sched Date: Fri, 2 May 2014 15:09:15 -0700 Message-Id: <1399068558-2373-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1399068558-2373-1-git-send-email-john.stultz@linaro.org> References: <1399068558-2373-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=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: , A commit in akpm's tree (printk: remove separate printk_sched buffers...), removed the printk_sched irqsave/restore lines since it was safe for current users. Since we may be expanding usage of printk_sched(), re-add the irqsave/restore logic to make the functionality more generally safe. Cc: Jan Kara Cc: Peter Zijlstra Cc: Jiri Bohac Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Signed-off-by: John Stultz --- kernel/printk/printk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 82d19e6..bf62f2b 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2586,15 +2586,18 @@ void wake_up_klogd(void) int printk_sched(const char *fmt, ...) { + unsigned long flags; va_list args; int r; + local_irq_save(flags); va_start(args, fmt); r = vprintk_emit(0, SCHED_MESSAGE_LOGLEVEL, NULL, 0, fmt, args); va_end(args); __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT); irq_work_queue(&__get_cpu_var(wake_up_klogd_work)); + local_irq_restore(flags); return r; }