Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp722149pxb; Tue, 2 Feb 2021 16:42:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwam+Z88xorLs/OJ3OGmtabXBIkm2qq2zXA/9MfUMwe82Wpa8aHNXDP353vgT2vT1Ys5JNf X-Received: by 2002:a17:906:3285:: with SMTP id 5mr604238ejw.356.1612312937338; Tue, 02 Feb 2021 16:42:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612312937; cv=none; d=google.com; s=arc-20160816; b=HNCD3ML6Kc0jwrOYKzfCVA6QwkvAo04UO+jsseH1iFCEo1P1dNHSrrsj9upOfVNz2N ot7cCK5rZJZKCxegXccUF3zwNJYcSu1Lh27PDuQqs8/lFTpNVPwPMWdBw+Jq7F29Pz2s 7/BRv7924lUdzNYLEKvbB7Ps6a/Mj9nb04LODWn6ko30m0w+lmERzcmStxNnjgBAktMy xCYrgivnF/O1hDpAxhKGdgHVmQssvgb+/RxclLwLcXxZorROqNeGBtppwn58LdT+xM0t tM7UhQbyjCL2GTj+Os0oiVb+8Q8gZPBOSG7uM7lNOq9bSGtypAxlD17VdvtFW8wLWBYk pkng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ORFHoWPgyf/tybGL/ch+SBISN0dStnGDQs/QKyluiVU=; b=c35hzgOS6KSe9piaLlzVPyZRdo9GvdcgsrTbYBJpkoSKjKTWPeLXBPPWsdVXto4Ecb ndWLgW1sBhE7s3ErxlBqYjXkikTNcyl1zuVX6P4fiW12BZjBZM/xH0WGIGLhn2YdYeVk 1Ju1aOTwuQO27IzrvgBkX/9g9jkII916+peoJl/4IO1fJnbUnaLKjCyRjOn8vKiZau0U 5uxP2KgpSnrodAQjliHd+UT8Ie1JHMzczBU5r0KHZJrgkZaRRzet5qaUcueX6IHyfOwz J3/P373IKiZzMGW0Bhd5EF6ll3ZD5MXQFCQFcbMDnFsiBBgINrD1WmvyBIxakXv5AvLB S/jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si280379ejj.105.2021.02.02.16.41.53; Tue, 02 Feb 2021 16:42:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238857AbhBBSwq (ORCPT + 99 others); Tue, 2 Feb 2021 13:52:46 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:38002 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239016AbhBBSuI (ORCPT ); Tue, 2 Feb 2021 13:50:08 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 1F28A1C0B7A; Tue, 2 Feb 2021 19:49:21 +0100 (CET) Date: Tue, 2 Feb 2021 19:49:20 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Rouven Czerwinski , Sumit Garg , Jens Wiklander Subject: Re: [PATCH 5.10 067/142] tee: optee: replace might_sleep with cond_resched Message-ID: <20210202184920.GA6964@duo.ucw.cz> References: <20210202132957.692094111@linuxfoundation.org> <20210202133000.488857996@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: <20210202133000.488857996@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Rouven Czerwinski >=20 > commit dcb3b06d9c34f33a249f65c08805461fb0c4325b upstream. >=20 > might_sleep() is a debugging aid and triggers rescheduling only for > certain kernel configurations. Replace with an explicit check and > reschedule to work for all kernel configurations. Fixes the following > trace: The need_resched() part is unneccessary/wrong AFAICT. And it seems there's already a follow up patch that fixes this one. (I'm not sure it causes any problem). Best regards, Pavel =09 > @@ -148,7 +149,8 @@ u32 optee_do_call_with_arg(struct tee_co > */ > optee_cq_wait_for_completion(&optee->call_queue, &w); > } else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) { > - might_sleep(); > + if (need_resched()) > + cond_resched(); > param.a0 =3D res.a0; > param.a1 =3D res.a1; > param.a2 =3D res.a2; >=20 --=20 http://www.livejournal.com/~pavelmachek --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYBmesAAKCRAw5/Bqldv6 8rBBAJ48HfyU9GsPoYTA7njPW9uKITZJigCgoZXs5BkQ/YVNYF7oEueIyKZg7gM= =id0X -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm--