From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A528FC432BE for ; Wed, 1 Sep 2021 01:52:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 715156103D for ; Wed, 1 Sep 2021 01:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241715AbhIABxy (ORCPT ); Tue, 31 Aug 2021 21:53:54 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:57414 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbhIABxx (ORCPT ); Tue, 31 Aug 2021 21:53:53 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R501e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jnwang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UmngFf-_1630461173; Received: from B-VE2WML7H-1820.local(mailfrom:jnwang@linux.alibaba.com fp:SMTPD_---0UmngFf-_1630461173) by smtp.aliyun-inc.com(127.0.0.1); Wed, 01 Sep 2021 09:52:54 +0800 Subject: Re: kernel hang during reboot when cmdline include a non-exist console device To: Petr Mladek Cc: Sergey Senozhatsky , Linus Torvalds , Steven Rostedt , John Ogness , Linux Kernel Mailing List References: From: James Wang Message-ID: Date: Wed, 1 Sep 2021 09:52:54 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/8/31 PM10:52, Petr Mladek 写道: > On Tue 2021-08-31 22:38:42, James Wang wrote: >> 在 2021/8/31 PM10:33, Petr Mladek 写道: >>> On Tue 2021-08-31 21:45:05, James Wang wrote: >>>> 在 2021/8/31 PM4:47, Sergey Senozhatsky 写道: >>>>> And may I ask, just in case, if James can revert a revert of Petr's commit: >>>>> >>>>> revert a91bd6223ecd46addc71ee6fcd432206d39365d2 >>>>> >>>>> boot with wrong console argument and see if the kernel reboots without >>>>> any problems. >>>> After test, revert Petr's commit can work; reboot without any problem; >>> Interesting, it looks like the panic() is really caused by missing >>> stdout, stdin, and stderr, for the init process. >>> >>> Unfortunately, the fix is not easy, as described in the commit >>> a91bd6223ecd46addc71e ("Revert "init/console: Use ttynull as >>> a fallback when there is no console"). >> OK. But I suppose you could find a quick workaround to mitigate this issue. > You could either remove the invalid console=ttyUSB0,115200 > parameter. As a result, tty0 will become the default console and > it will be used by the init process. No,I just want to use a "invalid" console parameter for "boot up", because It could help me "drop" kernel/systemd log, keep the kernel logo on the screen; James