Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6127168iog; Thu, 23 Jun 2022 11:55:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t/s3sj3OnarXD3Xx1fsD4wrmPWBjY9w/4rYMViEfkQUzl9XxGP4+6alEElNjtCVZreU0f1 X-Received: by 2002:aa7:d9c3:0:b0:435:bb08:9ada with SMTP id v3-20020aa7d9c3000000b00435bb089adamr10243287eds.171.1656010557257; Thu, 23 Jun 2022 11:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010557; cv=none; d=google.com; s=arc-20160816; b=gIlNHGm9aVAR/a1OS52uGYKcoxinBefVfvdDddLOI5O6c6CcEp/fHv+YSYW+0LiDjQ 87XXWYcP09KbQUeVdlNrAKPiKinSIFXtIaTswlt4farEORF31OsHZa6v9900vZwEzqXJ qUB9/YWEV0v9FOLXFijsxq3ot9t/xfV4WFRvoFIniIQdRgqYKPjuHtyHbS6p7qlayJTY LOvn3sy0bmS98/J2P4OWY6neOu+mzlYwEAt+IV03rV44Kgr1VV8+oIQSPlf0pJxkz+YC Cx2uJErIqthD3Iy/F2lnwu8gT/rPEzEfJxeAMPhM02/6BgvAriQE2gzt83Xom8OOC/67 lU8w== 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=gwPtBirjUDzpJjK9pmmV9LBIq7dCjAIY/t+pmc6Tns4=; b=BFqVdG93PQtQ5IyGiIS46yNjaZ8cgUEgGpG9ghlTCydMyVhe8oVL0ZESaMnOfvQq7n nqyH49sRj/sEGJ8mNbTxFVMWPjIf0xQYmSsCrNruA5wbYM9MkCTE28gY2V8ytHZ+k3L/ SoFYqdrrAAZozLCKtZ8xRNsb19Wfasef0LvE1oT8M64PO9eOPysX2uZAGubUCzwzKlzp 2C7SbTpPbQu7XA1motRgQMr6W+VsZVRBAzFON15DM/0XVeT4MacaT2PVOeNko7Cqd0BQ jKRAPtSi1pZzblYsSmsDfXhEXDjHolNsF9xIyUMDW7u6qkxD6xJqT2Ezd6CxdaFTOlxT mJqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="fmHNvSf/"; 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 du6-20020a17090772c600b0071d3b6e50fbsi7872412ejc.402.2022.06.23.11.55.31; Thu, 23 Jun 2022 11:55:57 -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="fmHNvSf/"; 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 S235483AbiFWRye (ORCPT + 99 others); Thu, 23 Jun 2022 13:54:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235376AbiFWRw1 (ORCPT ); Thu, 23 Jun 2022 13:52:27 -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 032C2DFCE; Thu, 23 Jun 2022 10:12:55 -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 01D5461CD9; Thu, 23 Jun 2022 17:12:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD145C3411B; Thu, 23 Jun 2022 17:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004374; bh=SbNKiHk1n8rywKvmGjxKGqbWJZN8JHd6CI2MrYcUhyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fmHNvSf/7rHPh/sEsP2Oz6WRZRo1OdYn9OzkyftLspEnm3poprZ1SjUl9XTb4t9QL 0I1wJyaovnGBGKLe/l/q5EaehrIISShHqmHvFH+btaigJJDpetZ60KsPPTQ396i4Ud Yo9ZEWlSiEvhFTGus8xljK/M3p+IlbdVy+XiiAhs= 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.19 018/234] random: Dont wake crng_init_wait when crng_init == 1 Date: Thu, 23 Jun 2022 18:41:25 +0200 Message-Id: <20220623164343.577672811@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@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 @@ -965,7 +965,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;