Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6125296iog; Thu, 23 Jun 2022 11:53:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t9qMS0kQI95ABh9VIGIscKKxPCOr0bjbh7PpNpkrRFYSm7s/iiYfUkU607meNIFVAXV7OJ X-Received: by 2002:a05:6402:528d:b0:435:89c6:e16b with SMTP id en13-20020a056402528d00b0043589c6e16bmr12895227edb.292.1656010402755; Thu, 23 Jun 2022 11:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010402; cv=none; d=google.com; s=arc-20160816; b=zBvNp9wuKuocbOnDdoouvuSmUH1c4tlUhXAOrGDwVfACi8Zit2v9Xh3pFNm/sgSTm4 kXxcD5zx8JUx6h7nOPfM89zziTB7SisvAFXQ2syc78TaJ1M95Nc76BwhMNbSiGlhNJnb LSfSetsWq37ZKlJaCN4lCgX3eVkwPppMD70vQge+I36Qcpqxd0GzQnDT6dxrw7l0khc9 /VwUe+AiWZISUO1kn1CxdeyU+sPUuc/aEDgvJU5iPGSchJ3PE57sN96fgiu80lcPuz7j S+NaMWqonGZdzjBSEEmQcGeF+q+Q5b0WCt3vREkQxaMg6mVPc6GeUGzSyihM3GAD4ZFT RHcA== 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=KAjAGDq81l+52Sk8hiEtb7ZN/QvrRmDaKFov3Cr4ItE=; b=bdXZNuwkAvUoNb2fxof4rlajq9cvDkkUY6zxjFF2KM3XWJECKJKIzonZ+bh2zR40wu cIdUKGqcDJOEuYm9zkFCoxxpUvuExFCD4qD8LAOwLNmmt+xo+0m388dAB7f0iDKR+9lA T86gmmlDZgPn+3zzzKR1zYyFjuKdgwBqBsoDiIfDwdPVd1dkw9kjby9yxAlUhfvzte3Z pXWrhESrGS9iC5tyB2/6L+KJ5ZoWLgAUYiUDwsorXmw5ZQMptOS9XdkzL6KnZt0uKp3K DCTCFG/mUlS8oHSoa3ErBs2IZIUXGm6GQuSCW2ExPsvP7AbO9KjAz/OsuvBIvFroKm+d WkCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Iw8Uw+uh; 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 e3-20020a17090658c300b006f3916bcfc8si27770389ejs.142.2022.06.23.11.52.50; Thu, 23 Jun 2022 11:53:22 -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=Iw8Uw+uh; 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 S236406AbiFWSMW (ORCPT + 99 others); Thu, 23 Jun 2022 14:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236373AbiFWSLu (ORCPT ); Thu, 23 Jun 2022 14:11:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7FECBD5DB; Thu, 23 Jun 2022 10:20:21 -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 1AB0DB824C0; Thu, 23 Jun 2022 17:20:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86124C3411B; Thu, 23 Jun 2022 17:20:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004818; bh=wvyHoClL7ERvP595o/9+eYZSIUBBJhySOGYGJJR06BA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iw8Uw+uhauEWgfzCdzh+ZS5n2V+0kWyPDRlxT16mV4Fw/uEaiHvyqZoa1X+bTZxCh 3PfBiccoePL9VqaXNWMWxFqzsIZJWqWZq7XB+45SDfI8TZ/J/ztDkTIYTJODMxXtDl z6EBiEeF/Bj0K6Sko5EF6xnCtkOleUOlGFV5MFTU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jason A. Donenfeld" Subject: [PATCH 4.19 159/234] random: use proper jiffies comparison macro Date: Thu, 23 Jun 2022 18:43:46 +0200 Message-Id: <20220623164347.553547856@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: "Jason A. Donenfeld" commit 8a5b8a4a4ceb353b4dd5bafd09e2b15751bcdb51 upstream. This expands to exactly the same code that it replaces, but makes things consistent by using the same macro for jiffy comparisons throughout. Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -324,7 +324,7 @@ static bool crng_has_old_seed(void) interval = max_t(unsigned int, CRNG_RESEED_START_INTERVAL, (unsigned int)uptime / 2 * HZ); } - return time_after(jiffies, READ_ONCE(base_crng.birth) + interval); + return time_is_before_jiffies(READ_ONCE(base_crng.birth) + interval); } /*