Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp191052lqr; Wed, 5 Jun 2024 03:11:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmhvA2Mj4PTHezFrnWMZyxImsmcNoZIuxdq0BpE5SseKroddpoEC2ptYYtgYRL6E0FYA5ld7/oYfaD6lKYmm+sPMwwAk9WJZci4ZOeNw== X-Google-Smtp-Source: AGHT+IHnmxMQkI3GDIuXzDUbSBoGXoRMAS7TZO3cAcslhd5pyv9ASSFptVkpk7t+jTJpTYaAGTU0 X-Received: by 2002:a17:903:32d1:b0:1f4:8a83:a2dc with SMTP id d9443c01a7336-1f6a59ffa8dmr25185535ad.10.1717582262717; Wed, 05 Jun 2024 03:11:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717582262; cv=pass; d=google.com; s=arc-20160816; b=Mua8foMHRBJC4woJEnNtMGBiT9OA9tNc5e2sUIoiGXeNAcCQa2AxsWeY1yC+HTJyMH UkiE6Ko6pQSUjd2Oi5dDUClHtireEyPhHDaFutZIL1UZzARctH4e/lOlB6iHDNkdyy69 h6VvFG1gYyCcdxUF7pbfOmhJYImdtasX4hMr4TUcGsj15cze4Y9lk/WQC796x9BigOLf MbNOXDSDDjuKg3kCMoBddxpEdo4G66KzHlxoZe7sA7BY2gItxSQLZkfhyhH2uVcR4y+u Fc9DXYSf0fOXgiWtQvvtBPSSKlBGyh4zi0n4PLBPnwq6efqgoItRIXqryHuwwc5rmHhs F1pA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Mku7GzZWs5xanYMf7QuG6n9lfp8wLHBzVIbTOzZoCDQ=; fh=3Yr5tg2O3hayBekbTvJMnb7M2A+sXTdShWvC3uO0shM=; b=douhCsPx4nEtnIU8J+RIMWzFPv3lFRsaL5L5jNfRszPzno/yCzabTsPLCoLoGDkvGk i2Nm44p6g4WsLXeKTEYc1cQFlfgPziTM4pQIdbkGcvIEw1I6oZyD20gvqu6B/xguF3DX y4F9JC/hTxOw7u5VA/AKG/zjRNOCsUWSpyZHunaT67QKD7eE4b+WKlXJLt5/bE8dInix Wnx5D3emaA8c1S3/DeSosdrFSqFaPws4rhIKDz1QI4dCGEoGNxIfuyMQg8ER5uTM410U oCmK5Dtqi2HJJELhKc1LEsh5bjUJNmykvppljqJ7z6FjKZMwOkqHwVEa/hTG52dpSFbO j2KQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=f22VGsT6; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-202173-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202173-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f6323e9f52si17954875ad.335.2024.06.05.03.11.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 03:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202173-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=f22VGsT6; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-202173-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202173-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A601285BC2 for ; Wed, 5 Jun 2024 10:11:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 115B3190065; Wed, 5 Jun 2024 10:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="f22VGsT6" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB40C18F2DD for ; Wed, 5 Jun 2024 10:10:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717582254; cv=none; b=sGnotdtLlhTZnsbdLXc42Od4HjdqLYTRv3B/188b4rbAdoHNanhqcpGATmg6pCWLV6uD1sRaQtmBRbFJLAEKXcaF7NFujYmYS95Tcjm+lnO8mabJkcOGv7+jx9TG7RsXa8cKurTo6SfQ5i581bSxtsMGyRxgewZxlBK6Hw/lLeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717582254; c=relaxed/simple; bh=qglBQ7rwNv7Li7vvSQYY+g6s2ZyFxgycV1UGyNThHl4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FlZOZNDv2t4fTucT8y1RqpnApoSMmwGlpu7xJwlT94KZ9QyfCgRryESV7p+pViaQrulxjleTWVwAUJaKvn6KluhqVJFqHxKGfvHk97v9wCSDCu7G1bjWK9tSqfDnXZ3l5IBdlGHyyMOv5DQMJjSzpGyhcsU5ljdLLG+6xFOOsj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=f22VGsT6; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2eacd7e7ad7so2436431fa.3 for ; Wed, 05 Jun 2024 03:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1717582250; x=1718187050; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Mku7GzZWs5xanYMf7QuG6n9lfp8wLHBzVIbTOzZoCDQ=; b=f22VGsT6xc2gIcck1vuV8t01SREp6SboC3PJbt2QaYbpzjFSRzosvjnDDRFaE9r55L K7Ja9kQzxKCCY8fhx/brZ7ZasqPRpfj+G3Lkk30BHoVPVv3MthPzEC7aoUG0SRPKwP6/ SXbozYbKlU8kgVY/m6wVxfHiCYwJoINBWPZpKkD9cYW6PAkZP7HwfbZfjOD5alpVJfvI r+k5l0mU99HPlCtfOqxDj9uo55jmV1lzb9Q1qmzlcRBTQGHNDZOfOD1kqJuhd+ZGEKW8 i+DLvv7Eo8LhXJ+/+DiSJqg10PZxFPndKM5ILXJ3BFljomd/vVM8k7aeyTp7DgJNIjwE qIKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717582250; x=1718187050; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Mku7GzZWs5xanYMf7QuG6n9lfp8wLHBzVIbTOzZoCDQ=; b=WskVNvGA7t88JeGXJoiuQGoC7Mbn5H5A1DMekat1/W620DIWy50cz7B9y1oe6NuajS JPrXfJ3l7CO9CCU+SH3+wXUH1NLf/ht/cXscrQTjnkdQR+rfL5mkR1tOdJ+6Fk7tzrrj EIMJYFfqdRYtoYpHxm97KYH2QKZOfOhofPkH8UFO4qSO4fp8Ld5cjXB0WojCeYJsrdX1 F6OWMtFcVVfMPqBrgEXVyaxBVKlNO6/qNQEKFxg0SZWp4Rm7TnwkvpSDwuZbrwfS22H0 TjtkGUHcCOKtJ+t57aB5exK1J3sFXnUNmPI5dkUDDd9bahLbJg/FBv7hejS1NtranhYo AnXw== X-Forwarded-Encrypted: i=1; AJvYcCXYJHm/5uJOCY7wddgjNMhx+duam8oJ9T05aGpd39uhVa4p835YE3Y9AH7b7fiMoAT9h/LyFrKy3D8pfhEDbSZj6FKSA+gAAiZGKdaR X-Gm-Message-State: AOJu0Yx+MwtwzgU7FMSEK12Hhb0+5Poi0XstlpsjNvDx13PjnU+LUe/c 2mujESbOVArBfLPmswjCp2lRSkGog/1ifVsuVqQL8JxOMrbxnAnhf3Tx4GUelM84Np+QPu30HIG I X-Received: by 2002:a2e:8604:0:b0:2ea:c7f7:ea20 with SMTP id 38308e7fff4ca-2eac7f7f536mr10871971fa.7.1717582249973; Wed, 05 Jun 2024 03:10:49 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c28067b192sm1103246a91.30.2024.06.05.03.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 03:10:49 -0700 (PDT) Date: Wed, 5 Jun 2024 12:10:40 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Juri Lelli , linux-kernel@vger.kernel.org Subject: Re: [PATCH linux-next] printk: nbcon: Fix nbcon_cpu_emergency_flush() when preemptible Message-ID: References: <87zfrzvhsp.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zfrzvhsp.fsf@jogness.linutronix.de> On Wed 2024-06-05 11:57:34, John Ogness wrote: > nbcon_cpu_emergency_flush() can be called in a preemptible > context. In that case the CPU is not in an emergency state. > However, in order to see that the CPU is not in an emergency > state (accessing the per-cpu variable), preemption must be > disabled. > > Disable preemption when checking the CPU state. > > Reported-by: Juri Lelli > Closes: https://lore.kernel.org/aqkcpca4vgadxc3yzcu74xwq3grslj5m43f3eb5fcs23yo2gy4@gcsnqcts5tos > Fixes: 46a1379208b7 ("printk: nbcon: Implement emergency sections") > Signed-off-by: John Ogness Great catch! Reviewed-by: Petr Mladek I am going to push it... Best Regards, Petr