Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5473219pxb; Wed, 26 Jan 2022 12:51:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYNK4yxRaLHyxeTf97ZgpD+uQ/TMhaaXSER5QANXv1mctM73+AzOk0PF10N4I4Vwqc7KIP X-Received: by 2002:a17:902:ec86:: with SMTP id x6mr470131plg.96.1643230281699; Wed, 26 Jan 2022 12:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643230281; cv=none; d=google.com; s=arc-20160816; b=UJAWRGI/QEGSyovCer44g5+mePosyZruZGhcwoHNNs9uaamZlB246NT+dmejuKtkAQ vbvwWOmUOiDajseeIIDIs+YWW6mxwSfoR0CJec+8LbL8WVFwR/xSiJUzmP9edKeaX0eI pIgY13ZLXHRV6m/rHEeoB56R4HeeLUaHu8xvlvC13YJKQln7Iv7vDdYA0jOqJa/3oXi+ IDLxK7qMT8jEjx4KxA+5mdLRarDh+oJbD1oAKKPc+abgdSKOcLA9JV9knsBcE+WH0PxX tzz/yNUoPjxQzd0cIWxnRX1lzIeIssqc+Dj5XQuDHsKvKDahMjl7mnp4EudK/hGpbFO1 plWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=8yBk8OLXalHrHOlxvgZitP7VPxCC5qC2L1+E/Mq8jII=; b=Ejn1g5+MYKov5OsThkAVJrsGHohZJpX3WOBmf5u4QsxTKqk1e8nkdkeo3xlHKYcFcm /0rlcTET1VN+9EtEJ6JYIH28G6XyiqHO75yhcK/N5cWAzMz+euTP4QAeKPyaStaSNPMi tpUwne4W/EbLYT+P7g01hqeGf32y6KP+fuOT62/uM7UBsoz2mNthAYvyMoAxPqnAfAfK 13cOvlZGZBYw3Jd8lTm4hU0maV9JpGMsdUge7ABbpxe2lhOeX/aJhIrfZcSXAoGcmYyS uWT4JITI78+gljth6zyjIFaqdc+Q5vuICnL9VLfa8AThX3Fedc1Gv5DDxlvMjbjSmBsG BgXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pLOzjJWG; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si435084pgn.72.2022.01.26.12.51.09; Wed, 26 Jan 2022 12:51:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pLOzjJWG; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232076AbiAZJp3 (ORCPT + 99 others); Wed, 26 Jan 2022 04:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232073AbiAZJpZ (ORCPT ); Wed, 26 Jan 2022 04:45:25 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 349CFC061748 for ; Wed, 26 Jan 2022 01:45:25 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643190322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8yBk8OLXalHrHOlxvgZitP7VPxCC5qC2L1+E/Mq8jII=; b=pLOzjJWGEmOWER647NMm0S0oUU2o+isOxSfjnG7Lua9Gh6vC+V1LTx2Sk6GKA2Q2MsTEVL OAVI5DRGHDxZO/wgKru9qycRr/HxnkQBVBVTr4gYj6mJ286Yei4ZvfgxlWg5fItWtD997u KiqfnbW3hyiTJblKjeLUnBj39qgg6xANnk+3WsmvkzdyDXj5o7avhTS1N2yWGfNrkAG3IP 7FIn/A9UrFtBs+TCQHE2pEN9Te6G/zw6RESsD8KHWvk57v2dCnrF2cZ+dtGc7/Fl3GTphE oPTwAAGzuhXWvOivPESUST7GT33qpc6okjeSJPbdEe8GlWMRXu3vwyn/+3nGug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643190322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8yBk8OLXalHrHOlxvgZitP7VPxCC5qC2L1+E/Mq8jII=; b=ZSMwVtwQoHbjnx+mBlRQ+1QmefqBxxYLl5/EG+5QA/01ZE+zlUsFuUQP6hLeblYGKFYtAv xYs8alOvIrjDLDAw== To: Sergey Senozhatsky , Stephen Brennan Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] printk: disable optimistic spin during panic In-Reply-To: References: <20220121190222.572694-1-stephen.s.brennan@oracle.com> <20220121190222.572694-3-stephen.s.brennan@oracle.com> Date: Wed, 26 Jan 2022 10:51:22 +0106 Message-ID: <87r18un83x.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Is there something that prevents panic CPU from NMI hlt CPU which is > in console_trylock() under raw_spin_lock_irqsave()? > > CPU0 CPU1 > console_trylock_spinnning() > console_trylock() > down_trylock() > raw_spin_lock_irqsave(&sem->lock) > > panic() > crash_smp_send_stop() > NMI -> HALT This is a good point. I wonder if console_flush_on_panic() should perform a sema_init() before it does console_trylock(). John