Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1826394imm; Mon, 3 Sep 2018 10:26:10 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda+3Q5iVSzoV1BCifOHvUS3QWLAytCSLrrh2ufzU3dolzL1Son5Dy+Ng21tTx99Dq7KzZRl X-Received: by 2002:a63:f344:: with SMTP id t4-v6mr834372pgj.428.1535995570594; Mon, 03 Sep 2018 10:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995570; cv=none; d=google.com; s=arc-20160816; b=kdFIvcRfDMLDOm36tcPlklExjP2akWVrbsETgiHQ7HMZe+CYnuikRN5+btZkfvxGT7 UZjwi9ds0XVOdLFFjqp8PSXFSMrHAeCFwZKOZakYGFZVA0iPmq+GJVT5w/K8xJkysOzT dUqajKLKI5mgmF3d+9+AR0xxun/pS0Hce1btVDK7pI4o9BR7T49GGokhjpo7udCXYUQg mXXemO7ISWJOMvwvBB5k8KJqlNqHKkGipsSMp4gQjE0Ww9/scikVwpDe3TClf3g2/Ob6 B8zhiVm6Jr4dB8uZIWlHu36Z6uTz2WZDSNd70Ki27aLa5jbypEXabsRLekeaZg7UlUoV 9fCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=4cL2KFv7dxF3CuzYsCZA/AOTp5B3PKnugScWF4De314=; b=ReVfgBb75Hfm7upYiD+mBrrHvTHiPL8jK/bCF63vR6mc50Oi2Ih/6caHQYWUjJ8Kq1 X/y2nwk/JAd1zqurlsW8NpdOPtobPxa7aXumVlMdyFW9v8LV698nK9ldUwgyCld1V1r/ +bnewAVWzOY3XD1FgO7pUhrRGCz2cmlCjBBIRBJxLMFu2KaduO/IbiXQJXpTHNNwCfSP ZAdEWUhf1XTFvTGafdYjtBSXOEMhChNpq4KOZHRBmX1CJwYh3DPTnT95ibMSh/JG7dmT YC7djuPPZ4td26idf1676IFtx3JfGfhT1WhaOLhRv5fGCXTsCUBkRsna71zKffw4FbQJ pKGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12-v6si19138906plr.120.2018.09.03.10.25.55; Mon, 03 Sep 2018 10:26:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730446AbeICVpY (ORCPT + 99 others); Mon, 3 Sep 2018 17:45:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45494 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729531AbeICVpX (ORCPT ); Mon, 3 Sep 2018 17:45:23 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0329AD0A; Mon, 3 Sep 2018 17:24:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, Steven Rostedt Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Zijlstra , Tetsuo Handa , Sergey Senozhatsky , Sergey Senozhatsky , Petr Mladek Subject: [PATCH 4.14 095/165] printk: Create helper function to queue deferred console handling Date: Mon, 3 Sep 2018 18:56:21 +0200 Message-Id: <20180903165700.288660099@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Petr Mladek commit a338f84dc196f44b63ba0863d2f34fd9b1613572 upstream. It is just a preparation step. The patch does not change the existing behavior. Link: http://lkml.kernel.org/r/20180627140817.27764-3-pmladek@suse.com To: Steven Rostedt Cc: Peter Zijlstra Cc: Tetsuo Handa Cc: Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Signed-off-by: Greg Kroah-Hartman --- kernel/printk/printk.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2723,16 +2723,20 @@ void wake_up_klogd(void) preempt_enable(); } -int vprintk_deferred(const char *fmt, va_list args) +void defer_console_output(void) { - int r; - - r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args); - preempt_disable(); __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT); irq_work_queue(this_cpu_ptr(&wake_up_klogd_work)); preempt_enable(); +} + +int vprintk_deferred(const char *fmt, va_list args) +{ + int r; + + r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args); + defer_console_output(); return r; }