From patchwork Wed Jun 13 09:14:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Gerault X-Patchwork-Id: 9259 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3EAD423E4F for ; Wed, 13 Jun 2012 09:14:44 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 06024A18305 for ; Wed, 13 Jun 2012 09:14:43 +0000 (UTC) Received: by ggnf1 with SMTP id f1so220275ggn.11 for ; Wed, 13 Jun 2012 02:14:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=HV+Y6UoiwtsY9Z9h+t3xi54LrCzRdSdawklnxvls9qI=; b=IpdWRQocQWhQ8o8US591I/J3IaXYkd0pLO+0OVeTyxzZazY5mMnHJDNXE9cXdPs6wg 3tQ7c1lJyRhRg4NUJE/k6Mzi2H+1w8eKmslPTdmMM/U1vvLLza4MsVQXWCsImSvUzLyO WgQzgaUeLfRzxqGw/Ls5VKHAumbzh5Fr3hZI42H/DCxuGQ69+U1eMYi6n1yopLUOrwEE YIbJLjrnmiNYpeAcwqJlydSsrsZtTGMIi7lvCkEFFooOtBK3LWhrZIV2Dp24Hl2CPi4f sjymVHPH7Qa8bJUx/RzN6WyHNgpQuLuwhcgqO2ACdKNK5+/YdWcJPAz4iQctZNS0oNTv H/Cg== Received: by 10.50.195.234 with SMTP id ih10mr10116009igc.0.1339578883173; Wed, 13 Jun 2012 02:14:43 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp11479ibb; Wed, 13 Jun 2012 02:14:42 -0700 (PDT) Received: by 10.14.100.193 with SMTP id z41mr7461484eef.112.1339578881436; Wed, 13 Jun 2012 02:14:41 -0700 (PDT) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com. [207.126.144.117]) by mx.google.com with SMTP id e3si676799eea.50.2012.06.13.02.14.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jun 2012 02:14:41 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of aurelien.gerault-xsig@stericsson.com) client-ip=207.126.144.117; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of aurelien.gerault-xsig@stericsson.com) smtp.mail=aurelien.gerault-xsig@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKT9hZ/lP9UDASgRijMgHxj83NeiStkITj@postini.com; Wed, 13 Jun 2012 09:14:41 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2FC53158; Wed, 13 Jun 2012 09:14:37 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DC67026A3; Wed, 13 Jun 2012 09:14:36 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 8FB79A8065; Wed, 13 Jun 2012 11:14:32 +0200 (CEST) Received: from lmenxs05.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 13 Jun 2012 11:14:36 +0200 From: Aurelien Gerault To: , Greg Kroah-Hartman Cc: Aurelien Gerault Subject: [PATCH] printk: Ensure oops printing if console is locked Date: Wed, 13 Jun 2012 11:14:12 +0200 Message-ID: <1339578852-17617-1-git-send-email-aurelien.gerault-xsig@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkkMtAO5Ade1RSQnrlVlkdUJAS60fFQpmIRcR3RGwkYQXCpNjuh0acIzvvPYl+voyz6m5HQ From: Aurelien Gerault Ensuring that oops & panic messages/backtraces will be printed in console, even when the console is locked. If console is locked by someone else but an oops is ongoing, force unlocking / re-locking to display the oops. Signed-off-by: Aurelien Gerault ST-Ericsson Linux next: NA ST-Ericsson ID: 436456 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I9f571492fefc32291ecd0cc62f0ad7031cab7c6d --- kernel/printk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/printk.c b/kernel/printk.c index 6d24237..be2a625 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1014,6 +1014,11 @@ asmlinkage int vprintk(const char *fmt, va_list args) */ if (console_trylock_for_printk(this_cpu)) console_unlock(); + else if (oops_in_progress) { + /* force releasing / acquiring console lock to print oops */ + console_unlock(); + console_lock(); + } lockdep_on(); out_restore_irqs: