Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6030163iog; Thu, 23 Jun 2022 09:54:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uHwypRbcBqzmVHnl3x+M2K3AazENHf5lZp3yLYj9HPlTry35FziWvbYxAxr+e3VfAcYDLO X-Received: by 2002:a17:906:530b:b0:722:e9ad:e90 with SMTP id h11-20020a170906530b00b00722e9ad0e90mr9353568ejo.676.1656003278780; Thu, 23 Jun 2022 09:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656003278; cv=none; d=google.com; s=arc-20160816; b=GdrrllK48uVvIcOlXshGsaOuZjpygOP/ZDTXE696BD0X7XPpDFk0DSXd2729CMwOT1 GU48lC0ly8SsdOVpZ6nYwRtXMPl49NnobE85zIXZ8DY1dIa+OESkR4OpS7YzNwasLAwh AOVPjHOhWEQcLXGzRXcXRiJocd3pmoJQTyzYIiZuiDu26BglDfmuy+e2ehr+rcUZKuCx XLrNKxk9tnZ/Jbv9gpyY/uRhvDGByRxpDvoXWd/ot5FVFWNHeCMZENiPFRYrbWhZFFQn eItnm+rt2NaVX/lC0W7gOWzFcMwosq371eXSSakoa8bWzXg2RG22U6LTZ6jRcApIyS+I SMCw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b2a3URKsmys6rGT+uQt6ZwlJdVvWl5FN63jVoW9dG3Q=; b=IuC2/xMJ3ZZ+V45UUuVwxFjlu/csDO5fjnvTVjezfvc7D03fWANHtzNXsTVLh9ywHN xYl1Lh7rH411wvMFbHGL7jy6aeAnAmE4od50mkYB6+Fe+5Il7OZS1jyaEidEwbI5chBf fiSCoc3o9oUDiNHBdNfJH9SP9XjGAnJ6Kp0HGNE49Yfsxmlm/1mqD41tgY6zBWh/hLDM E97luiCOaR+6hrFqY+uL1IvYJQjzm2cE2DgkwZwGJmKs3uwn9e2z1FgB6TklGV7dkKb6 LiMK2YoHABhPFw/0fDJ8g671Gl+0oSwiOFvLJV08OddBwgbtimXfz0b4v1f4bLVuwPZp cdEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gDSQe5xh; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb34-20020a1709071ca200b006fecf448d83si1984566ejc.220.2022.06.23.09.54.08; Thu, 23 Jun 2022 09:54:38 -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=@linuxfoundation.org header.s=korg header.b=gDSQe5xh; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232649AbiFWQt2 (ORCPT + 99 others); Thu, 23 Jun 2022 12:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232758AbiFWQsZ (ORCPT ); Thu, 23 Jun 2022 12:48:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD5C4BFE4; Thu, 23 Jun 2022 09:47:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C8D9961FA4; Thu, 23 Jun 2022 16:47:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD2BAC3411B; Thu, 23 Jun 2022 16:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656002852; bh=GgW9rHCAKlZa1bYGLTKcS4p/eIUuL+qSoAlKD2rXBzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gDSQe5xh11HX0SwQa9xW2kce7T+BMdb6QzTc2C2UfS4DzGke8OJpe0moLB5DDVmMt 35j/4Qd0B3M3YBjCVAaQoLfTlTwNe2sVFdYThyrl5Qj1KOPvGhP5zZZcP/ev1rxYYv dKiMKxDk+Dhyuwc4FQbL52+xAkbARdLgrZGsE5DI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Herbert Xu , "Jason A. Donenfeld" Subject: [PATCH 4.9 048/264] Revert "hwrng: core - Freeze khwrng thread during suspend" Date: Thu, 23 Jun 2022 18:40:41 +0200 Message-Id: <20220623164345.430102071@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Herbert Xu commit 08e97aec700aeff54c4847f170e566cbd7e14e81 upstream. This reverts commit 03a3bb7ae631 ("hwrng: core - Freeze khwrng thread during suspend"), ff296293b353 ("random: Support freezable kthreads in add_hwgenerator_randomness()") and 59b569480dc8 ("random: Use wait_event_freezable() in add_hwgenerator_randomness()"). These patches introduced regressions and we need more time to get them ready for mainline. Signed-off-by: Herbert Xu Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -327,7 +327,6 @@ #include #include #include -#include #include #include #include @@ -2484,8 +2483,7 @@ void add_hwgenerator_randomness(const ch * We'll be woken up again once below random_write_wakeup_thresh, * or when the calling thread is about to terminate. */ - wait_event_freezable(random_write_wait, - kthread_should_stop() || + wait_event_interruptible(random_write_wait, kthread_should_stop() || ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits); mix_pool_bytes(poolp, buffer, count); credit_entropy_bits(poolp, entropy);