Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6133394iog; Thu, 23 Jun 2022 12:03:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v47RXQsG/AieFBjUZrqmHHucIJIvJHvR1xCtpJjfrjW//piaU3xfo+4BVCEdkLcIhQ6fmM X-Received: by 2002:a17:902:a50a:b0:162:3488:27c4 with SMTP id s10-20020a170902a50a00b00162348827c4mr39578324plq.109.1656010998082; Thu, 23 Jun 2022 12:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010998; cv=none; d=google.com; s=arc-20160816; b=r/4hRr1iw1OgMtDAsjbw9134yI0mNv2kYBbIwMHyGfHEydQU+AtxSzVeNopDL4Mg5D 6tIByq1ufmOcLoEzyP+hP+JN7O8+V/5BRiD6mYgFppqU/BzxeLWgEzjVV6AL8GnTABdz YeP25O9rwrUdwV5HZAafcaAZyt6/GC2TplcVsORPWaqwknLvUqo5rALpsKDuA1xZSkmb v4PKgMpIseQGTTeYeMUQcafeJm9kA7QBTnuCq1f77iP4xIzkycFa09sFu+PYMCeZ4fwn OKTltRjkszna8d0KJoGczyz6PnshZtHEOJmcJbIiU0wjxwlF06HLy6SU4L8RfM2UXTM/ K0Xg== 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=a8f1GsGTy0MW2SipAJ7xbIIDTTVdXe6wFVu9vA6kECY=; b=vjScAOgcnO6MAELO0un1i/wAAH++qioEAGSnVhbhpd/evnhRCpZrnEjaMStXj6Zfwh IZlByk5WjOx6BRO2m2oURyjWNvgOhAiLK6VN2OxQzZo5kI5/tFKZlD6og4MmYqb3ptLx y8Twv8iJoWSAMUdosNiSDaKvtDtDZ1JFH0ALPO9TCCbUQcVmtbzQANgE/qhpo+z6XeN8 546KXEWQtWzZOiYAVg7TembKrZA9y9LND6NbNhL9KfsbXnAXdiyRPfBz/YdKdDufx9gy tTZ2FmfgIHWg0IjOG1zYflO8sPGTtdAShGqkjUsiz9zzTHdofpQAqKPojz0+SsKaxICQ u60g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N95q3NTJ; 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 x11-20020a170902ec8b00b0015eafbef962si548681plg.31.2022.06.23.12.03.05; Thu, 23 Jun 2022 12:03:18 -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=N95q3NTJ; 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 S230449AbiFWRGs (ORCPT + 99 others); Thu, 23 Jun 2022 13:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbiFWRFf (ORCPT ); Thu, 23 Jun 2022 13:05:35 -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 19AF0517EE; Thu, 23 Jun 2022 09:55:35 -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 0918360AD7; Thu, 23 Jun 2022 16:55:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2651C3411B; Thu, 23 Jun 2022 16:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003333; bh=wKMkV5rfQc+zDw2NvKbWHa6wP6CeVEtieC64LbcrhLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N95q3NTJIl9zKcS/PDu/ubKBPm5F/OM0dr1rEa33Cz6U4HhFcresUm6kuO7R7Ng3D 7bzKPgH1HEwi3cnoHegNnMHnNo3Nek8omVPbDBM6F1slpkVCCgFTBtwWXHJuAiRU4E xN0yO90ufWIxaIWquNeQIX6fxLpPJiY86F2f1/8I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jason A. Donenfeld" Subject: [PATCH 4.9 203/264] random: use proper jiffies comparison macro Date: Thu, 23 Jun 2022 18:43:16 +0200 Message-Id: <20220623164349.814560964@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: "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 @@ -325,7 +325,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); } /*