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 6695CC432BE for ; Tue, 31 Aug 2021 14:38:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A2716103D for ; Tue, 31 Aug 2021 14:38:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238055AbhHaOjr (ORCPT ); Tue, 31 Aug 2021 10:39:47 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:57106 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237410AbhHaOjk (ORCPT ); Tue, 31 Aug 2021 10:39:40 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jnwang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UmloMMs_1630420722; Received: from B-VE2WML7H-1820.local(mailfrom:jnwang@linux.alibaba.com fp:SMTPD_---0UmloMMs_1630420722) by smtp.aliyun-inc.com(127.0.0.1); Tue, 31 Aug 2021 22:38:43 +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: Tue, 31 Aug 2021 22:38:42 +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: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. James