Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1983996ioo; Sat, 28 May 2022 01:14:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRKK6bQ2JBHttDLpY+VX3cgix3q7vyYLRR9LfPdV/g8fQzNL9DEmOLHV/CKvfBLGEcoW7u X-Received: by 2002:a17:90b:4acb:b0:1df:af66:1d2 with SMTP id mh11-20020a17090b4acb00b001dfaf6601d2mr12224350pjb.181.1653725692985; Sat, 28 May 2022 01:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653725692; cv=none; d=google.com; s=arc-20160816; b=f9A6th4CSF8Os72OPQHL+6lmwllXh1dJleQafZg+t8LnsJAf3htYmIsUbr7i+xHlT6 VISQQwMdPCmD5Dq6shPyT7Ht4UqIfk0uW/s35Rx0IQXHHTOq1xwNLb2bp5XxZ329o3Mh E4RwauZb1UYbMyISfN8Bp0FEQQafuf7ih6bI4kvHrsr7sBY7AUwIR6q+7tFJNbt6PTQN SzYhGPCbRX7txjTTFyUj6zYW/snAUe8w5vxM2dk2RsTopuy43cMGSAjSJTb4LfyWgow2 k/f2AF3qvWY0b23mfdLVIfGlnmiRz1xsmDoiyz/QDnb2eU3G2/vhalJsN3JMbRbsMz1p Gr2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=SAFSnSkV1VEivcDSkrTNQ/mWfwoWqDGa1JHVMaX2nZo=; b=RC5ALeid6Xw9VPPkbbBhnOQR4frqI2C79bkGt9TXS8ySfhEsIYNI+5k+z4t4b+/Kn3 6r7OKdpAHbvAhFo33wZdOhxveSlwSW/guMvKiNTvBoA+i/fGGqBzO+XbcnGEeOMvF+CS HGwW8iD8hPjj18CUKbVvcIL0+gEDG8DnxUiPyzH1NTksezvLwAV6JlSS+1HeZzly0L4I iMvyw2Jj27Hv4ENWOzKe78lUGS7pDOje3qdvNtO49xYivg0VAgTbIzk5jpB8xp0R2rLB L2qCLJ/h/34CTfUwUXyHV4jZVyhonrGN/4pqPz0uopERdWxqsg72g+HtftvbWycyX5fo uHcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xwiY7PER; dkim=neutral (no key) header.i=@linutronix.de header.b=eDZldoJC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t62-20020a638141000000b003f652e5e89csi8770237pgd.4.2022.05.28.01.14.34; Sat, 28 May 2022 01:14:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xwiY7PER; dkim=neutral (no key) header.i=@linutronix.de header.b=eDZldoJC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236052AbiEZUbD (ORCPT + 99 others); Thu, 26 May 2022 16:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiEZUbB (ORCPT ); Thu, 26 May 2022 16:31:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A62DFF75 for ; Thu, 26 May 2022 13:31:01 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1653597057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SAFSnSkV1VEivcDSkrTNQ/mWfwoWqDGa1JHVMaX2nZo=; b=xwiY7PER4zBLAKzqhHJy3sw1qMEn1KYhwhsfqCQt0uju4sN1ROMyoh/OTnwLF8RThG/Xy+ RrmqyMGfZSks+LfnRc4+R8sVPYKAUBT2bO3xaW8I6gpO28th6tfOMeehoMTy6bkl8FPRw4 L+36TzvgirWbEn+cgP8LocpQrV1rckarhuL4+ic2sgH4NDdqZj/lgwye/mHt3SkhlwuOZ0 L7DDCLb34oJPD8TVRtQNrbUOHlHjBql3thZ7U34g0nY32LDqz6XeP6CZ65vqnp4PPXvlml 7980bmpLZm2ckjh2Ovxtc9nLr7rePURtHPzXiHkzvbzWa+fslCHHdyiOspuWvg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1653597057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SAFSnSkV1VEivcDSkrTNQ/mWfwoWqDGa1JHVMaX2nZo=; b=eDZldoJCUGXSWw7oL9YSmyeFeQLPu17+U1s7QkaKgPWM/ucZIqUfH/2QPM/r+R+2BSBjZH d4Uf9RQHyvo3oCAA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH] Revert "printk: wake up all waiters" Date: Thu, 26 May 2022 22:36:56 +0206 Message-Id: <20220526203056.81123-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 938ba4084abcf6fdd21d9078513c52f8fb9b00d0. The wait queue @log_wait never has exclusive waiters, so there is no need to use wake_up_interruptible_all(). Using wake_up_interruptible() was the correct function to wake all waiters. Since there are no exclusive waiters, erroneously changing wake_up_interruptible() to wake_up_interruptible_all() did not result in any behavior change. However, using wake_up_interruptible_all() on a wait queue without exclusive waiters is fundamentally wrong. Go back to using wake_up_interruptible() to wake all waiters. Signed-off-by: John Ogness --- kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index a3e1035929b0..ea3dd55709e7 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3904,7 +3904,7 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work) } if (pending & PRINTK_PENDING_WAKEUP) - wake_up_interruptible_all(&log_wait); + wake_up_interruptible(&log_wait); } static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = -- 2.30.2