Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6045497iog; Thu, 23 Jun 2022 10:10:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sAkwcEjPQDXJBe/4T8GZBtnsrGsG9XGL03Ru4AzT3qySTjXU1FA0YZb6w5EYCFR58jJ18g X-Received: by 2002:a17:906:dc8f:b0:725:28e6:88d2 with SMTP id cs15-20020a170906dc8f00b0072528e688d2mr4114403ejc.411.1656004258297; Thu, 23 Jun 2022 10:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656004258; cv=none; d=google.com; s=arc-20160816; b=oH2euh3kd31fRcr9kMB2QtLVf+84/h5AxUv2p6IkpFSVwzdw69Gk59Av6Rx3tuEa/l SqiDHa0lTAKftdt9P197DGBPGV3q8XVOwIjvPiYKgbzcLNL7lH/o3JHcw4B02Xb6bc1n 1sL5dW/F43W3p03LhMfVGRPGVaYzvasFDflCqKvCnfzZZvIV4BqCxc9EdHIHWasUtlux SdngoptRJvv4USN4EOBpwkPiohdZdBCVys8m4aK7nOWfCXvP5cqu8jAT6W1h5YAdGP3I PdJSPZWGs3ur+eulIer3bjbH/NPlwM5Yo+Gwvz88/R83oYV8QuzLYXEYnGYI8s53D9ee cueA== 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=fToWlcq/MA6Dm2O2Pbwl3NdE0O0asqupMVWA1C/mChE=; b=IEoZH7fdSzWwVl1skTI7xMHPsXlESe7AVgc1uwBY4bSqgciQfkrOl1Wy4OuVtezgm+ yPkJIT8+9xA1sQ7uMbhF9hYv3RztHuhKE5L+tzkzzyhT57PS7Swo5Z49haR8pf/whUfX PLcu5gsxosYfn354XFefAQsh+cTcdOnM2SwatxcJOqX31QpgX20Yku4ZwYZ2Hm2tCUEQ IrbNUog071pVvnImMi+11JyVrJ3/DaThYkis8aQ+5d8n/lIGRqz/4O+FMtTtTE8vraz0 WKD0vQaFbMwnOpa48AVBLGwLfWke1Nxp19flwM01YIYK9z/+WmWeDcLYBnoAj/9Lr08i 7PSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ITKFvKJr; 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 ss2-20020a170907c00200b0070d8de4e431si19203052ejc.206.2022.06.23.10.10.30; Thu, 23 Jun 2022 10:10:58 -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=ITKFvKJr; 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 S233059AbiFWRAm (ORCPT + 99 others); Thu, 23 Jun 2022 13:00:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232750AbiFWQtg (ORCPT ); Thu, 23 Jun 2022 12:49:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C13984D9CD; Thu, 23 Jun 2022 09:47:50 -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 ams.source.kernel.org (Postfix) with ESMTPS id 07564B82486; Thu, 23 Jun 2022 16:47:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25CEEC36AE5; Thu, 23 Jun 2022 16:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656002867; bh=lIWwdAK7PS2xZHeSvM/0G+O+IhEyhPFQlupW54rNC7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ITKFvKJrD67RNH85BwoSSKedUOCi13p/eSfLUc48wXb9Q8vKBs7FFm3/o9OoVgYja yAjh0KM5x2+WoatZoVmPkMKzoa2UViS7+BJ0Zv9YLpJrgcpTsVSKwxGjoHcV3ZAI4L YwysuOwTKX9RM4KSLqTLiB+K4BaRmgweuR/Bba6w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Lutomirski , Theodore Tso , "Jason A. Donenfeld" Subject: [PATCH 4.9 053/264] random: Dont wake crng_init_wait when crng_init == 1 Date: Thu, 23 Jun 2022 18:40:46 +0200 Message-Id: <20220623164345.572346929@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: Andy Lutomirski commit 4c8d062186d9923c09488716b2fb1b829b5b8006 upstream. crng_init_wait is only used to wayt for crng_init to be set to 2, so there's no point to waking it when crng_init is set to 1. Remove the unnecessary wake_up_interruptible() call. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/6fbc0bfcbfc1fa2c76fd574f5b6f552b11be7fde.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -963,7 +963,6 @@ static int crng_fast_load(const char *cp if (crng_init_cnt >= CRNG_INIT_CNT_THRESH) { invalidate_batched_entropy(); crng_init = 1; - wake_up_interruptible(&crng_init_wait); pr_notice("random: fast init done\n"); } return 1;