Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9986409ybi; Wed, 24 Jul 2019 13:35:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5Bc+8bKpjvWJ1J9TB7MO9Dgyv7B76kCqqdgtFllUCpnrhzL7Ycv1dI5O4SS+gYNyKy4xf X-Received: by 2002:a65:6546:: with SMTP id a6mr28758661pgw.220.1564000533017; Wed, 24 Jul 2019 13:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564000533; cv=none; d=google.com; s=arc-20160816; b=kUZVFhgdKjxLu9ir0RayRcAnApxuEZuFbwEcAzLLE0XkqnCOeFbKvTsrEa0P6Bdysn MH/nJpg5Gs0iM03gDc11MINTiEr3mShnJlEFeYc1gABvz4eLqJwlPrnSKEcEQQetOomG gdoC24nH+ckDIeBWjyE9++f9PC1KZANAAhrDx9IPUEdWo/PY3NWDPFAtE4dKAZBI5KN7 x761jfAMlk3eTN/yLRb+qFnoxdRXDL/C+ccSLSLSI5QzvtSiE3rQdlXIq/bzhPrq84CR fTviGXyAKcCXGipCKQpQLm6qlEjTKrrlpamUUWhbKj75weXAFT0H/arri7vOM8NPxMD2 STtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ILNMTYyYaH4RFDaGCQZR06onIZzwT8uueS+wmOHaAA8=; b=U3ohcM2KKUS+s158rs70sXOT1Ra6BJr1czOym/5ugwGfVrBdwCQJ31f7WsUfhcWMpF SFTYwtsU1IfJsrq7tt4Y16fJc0RE4DZBEO/Nw8DgDiwsNkI6JXJ+76KGecGLwOOYf+r9 NEUQKZtjmUbuvNuoy6rl6OBJu6zX6EW5uwdZtZxVljGnY3zFMeEqSwcvzYLkOgAxRYQf 7xauiYZm6gZ03fmoMtq/G5DWA+RCqKv8RIScWSECH8983xxL/nnAiNlhc558ceIebJA9 pxUXxKabeG6fy+UOoi5ppK22cKM3r4q6GOXiWmhlS9w97teem4ME1Dvkfo7ElA7o8rdp ikFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EHBwpB5D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b61si14763886plb.401.2019.07.24.13.35.18; Wed, 24 Jul 2019 13:35:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EHBwpB5D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728794AbfGXT1R (ORCPT + 99 others); Wed, 24 Jul 2019 15:27:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:44790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727645AbfGXT1P (ORCPT ); Wed, 24 Jul 2019 15:27:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C6BB9229F4; Wed, 24 Jul 2019 19:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996434; bh=oykOg457b4MOi6oKg3nWwv2kHjXazVRNX17Xw5Z9xuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EHBwpB5DIWnuS5reWdBkUNz0UwIYj8oTifuMYFgMKsCvXCNX/VwhGOwrPHoqmM1Cm lMPXiDEzPh0u9qyhcXo1vwslo8I20uXrpvicgfuPOmmh2nzNNFkZK5ooYtynhDNEZZ bQFUwX8YoUiOnbeHUhZh1bXCSEBjRiB/XwChqmak= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Biggers , Ard Biesheuvel , Herbert Xu , Sasha Levin Subject: [PATCH 5.2 095/413] crypto: testmgr - add some more preemption points Date: Wed, 24 Jul 2019 21:16:26 +0200 Message-Id: <20190724191741.831988026@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit e63e1b0dd0003dc31f73d875907432be3a2abe5d ] Call cond_resched() after each fuzz test iteration. This avoids stall warnings if fuzz_iterations is set very high for testing purposes. While we're at it, also call cond_resched() after finishing testing each test vector. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- crypto/testmgr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 658a7eeebab2..292d28caf00f 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -1279,6 +1279,7 @@ static int test_hash_vec(const char *driver, const struct hash_testvec *vec, req, tsgl, hashstate); if (err) return err; + cond_resched(); } } #endif @@ -1493,6 +1494,7 @@ static int __alg_test_hash(const struct hash_testvec *vecs, err = test_hash_vec(driver, &vecs[i], i, req, tsgl, hashstate); if (err) goto out; + cond_resched(); } err = test_hash_vs_generic_impl(driver, generic_driver, maxkeysize, req, tsgl, hashstate); @@ -1755,6 +1757,7 @@ static int test_aead_vec(const char *driver, int enc, &cfg, req, tsgls); if (err) return err; + cond_resched(); } } #endif @@ -1994,6 +1997,7 @@ static int test_aead(const char *driver, int enc, tsgls); if (err) return err; + cond_resched(); } return 0; } @@ -2336,6 +2340,7 @@ static int test_skcipher_vec(const char *driver, int enc, &cfg, req, tsgls); if (err) return err; + cond_resched(); } } #endif @@ -2535,6 +2540,7 @@ static int test_skcipher(const char *driver, int enc, tsgls); if (err) return err; + cond_resched(); } return 0; } -- 2.20.1