Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp432714lqr; Wed, 5 Jun 2024 10:02:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwY4IC99CEE/9Qfo3slKs83xHv1gwUUVjHiDkwm3vEWwZ3lbIlL9KMFsyl63ta6kgaeJNkGXzdBv189uDSjRKvShGrj3C+bV2GhS/NQw== X-Google-Smtp-Source: AGHT+IFznpBKarc9YvHDQpGLUbQLYuy5w43Cl9j56eNmx8NVdj76omtDk3ou824uk+gOIf65HkwW X-Received: by 2002:a17:902:7b89:b0:1f6:1ef5:8826 with SMTP id d9443c01a7336-1f6a5a1b969mr26137145ad.34.1717606929300; Wed, 05 Jun 2024 10:02:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717606929; cv=pass; d=google.com; s=arc-20160816; b=hkGguZUw+8boP46Cbn4iac6EHgoxCzVQAsd61oqxlYFldhrsL2fi2nK8KR8NmskQPX Lu0XWEXL5wi76lQZBua93vmf7EI6SNfaqessNfzKykng6EhFEi1LnBS5ksaVwdQ9a1C7 7AxnkY183Yo5/wEdffCzswL35LW93rr9uk6doKyOfVhWcjSMZ1Uyua7xgke3edk2GzW2 tsFgA5d3zyKMF9AFx198sgOfm7jcRtLdajqdcd9O4rwzan68N2uNnuNBIqEnIpRKQbPj LPg/MriIiPVT5Y1YAsmJIIwqgHo0bPzIJ1XR+ebUJCtcX5rKKCJiSgSMDMA5qi7NI2Jq 2QFA== 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=BVZuE776yGSMDe8Ul9Ea1lg+Z5ediOnv6+D7nuf0GTY=; fh=vybfznR/inCzGOWQxh6WuaMg6q+fHpJEGLzhPxgyV4M=; b=TYXF3A4rya3fHrlcYg8AICTaQUQFJPpazqc1GfsF0JQ7O8m7Enhe1yG6qmOBTT3bzE zKvcywOJmoOJ695mvV93ND0j6p6rrxOxPCZPHOCUfhVDOzea4FkKe3MECVueXIyIy65h uD4HU6UPKAFFWS5/lRlVEXPAyCXiH3MySDMK8vkLx9QoquGyaAmBdG1vOzH9HEaXkbWK AvA+zhZUUATM2hU9P0pMjMh2ynxYJjUUeAC2STjvJuk/N/Mfzou+sXhjJwCnSrZaNJC0 Tm0Nb3NMr0d1zFRT3ox3UoTVxIi7BCC2qR2Rk2BkSnFNEpKMs/XTmBa9xcDNrD8F/hBx aJAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Fbcteorc; 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-202951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202951-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6323ea252si32802775ad.373.2024.06.05.10.02.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 10:02:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Fbcteorc; 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-202951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202951-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 52AA2288FDF for ; Wed, 5 Jun 2024 17:01:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68CC5194135; Wed, 5 Jun 2024 17:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Fbcteorc" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 E46D719306B for ; Wed, 5 Jun 2024 17:00:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717606804; cv=none; b=jTrdJi4dzOS/h3KHEqg2NTUnjMKiHc7nh8MgxBO57N2DDVcFJqVTX/JsyGkKNqMsuk/oEhDTSKwdIUc5a/Ke7G+ndEAuSB5OyWKlfXi4UXmd1rZs3jJo74bOA951+Bw+txNc6ttIU78bLuavJQM0LFsnc45ei4qK/xN1yXCkvaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717606804; c=relaxed/simple; bh=lpIq1caDdKiMHyQdV9qBvSXjzC7XEcEix/PC/mrNJoo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KnVGkomagh9qKA3kHpOolUtcFEBW/e+TJ06OcnrXAJuvVZhwzlRjF0NnlPnEjfGkXbGctDM672Z2r4uUPcDmvwbu30HdGtEZMIeVHFci/+Q7QX5AaVsFvmwePTeVRgDRoY+vs+4lFCFxpNLCUTk2l/Pbya7/ZyS8ZbJYEqkbDHk= 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=Fbcteorc; arc=none smtp.client-ip=209.85.208.178 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-f178.google.com with SMTP id 38308e7fff4ca-2eaafda3b5cso419591fa.3 for ; Wed, 05 Jun 2024 10:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1717606799; x=1718211599; 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=BVZuE776yGSMDe8Ul9Ea1lg+Z5ediOnv6+D7nuf0GTY=; b=FbcteorcxDh+Wou1oPCvW2kIcv/NSB1vG6+WalsTmoEzB1guC0f8GpHNXiVK7Sqzux 2xP+EpKy76gq7evJNQhptSd6BuZZg7dH4B5IRdQerd05uZgvKfqbKBUVlcpfKB8WJfLh Qc9SON2bita2W6BgtRG+02K+R508tBZ2jDaO8py2L5e6tk7GFjf14AMRzkxMuoi76jiZ 0HAOgp69e7GTlfJH3k1/o/Bg7tqC3kysVos1VeYRJVbbmK6AZojSzmuB8W2Y6HDcGzLJ pV5zGjPJzrfb5Vk9CWwehwSa2LIq7fr8SA8fB6UYc5rAVe3EMlgsMfiLvYWMCh6FCF7j EiOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717606799; x=1718211599; 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=BVZuE776yGSMDe8Ul9Ea1lg+Z5ediOnv6+D7nuf0GTY=; b=rqCcQB9i+iwhW690nzMRtndciDaM5x2oLXyxG/PnUdmPqB3hgWqYe4jUtwAZ5IxoOL DuArmxvgRZFJrV/bwSl7bQAdQ//GBsnJLvjA7odScyvCko4LfvcGreu5P5NjB438fPos rU7hq6NDiXK9foqBxhjGDRWbHR8mberOrpv3L0xvSJQ5PGZ1CKpIynlPvgWAjxHlnVI/ H7uxvWFQwLumtC0VgZyDig2CMojBZAHz5w5q+a6rwmlt9EyD+yG2W/VmSZEx77mtQYg3 gFRG1Ff24O8hBEqMsWdkEky+jMGYULCJ2ojXq4pgcxxZwW10+PuYZzSNCQLGN20UrNJ2 PclA== X-Forwarded-Encrypted: i=1; AJvYcCVGaxDxbjTyNOaD3q6HwSs9Ltcd92qgHevbMVHSD1OqgHn4dkmv2zEXbo4cf5qS+T5dlsbMOHp6NwZT4acHpesYfBm26Y/RWbs2zScF X-Gm-Message-State: AOJu0Ywus//0YI6dqevoXUA9WQk+s4f2XFOZ9UCeAMl+KVpmQNt3LpNO Va5iQkFJXqIjTtwsP8t7feFrAv2CtDVanq3neJ71cudvJbUzjTkn7hYCH9nA3po= X-Received: by 2002:a2e:3004:0:b0:2ea:7e51:5166 with SMTP id 38308e7fff4ca-2eac7a4c786mr18777771fa.41.1717606799005; Wed, 05 Jun 2024 09:59:59 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6c355cd393esm8733569a12.49.2024.06.05.09.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:59:58 -0700 (PDT) Date: Wed, 5 Jun 2024 18:59:49 +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 JFYI, the patch has been comitted into printk/linux.git, branch rework/write-atomic. Best Regards, Petr