From nobody Sun Feb 8 10:33:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1657298330860326.42278099495775; Fri, 8 Jul 2022 09:38:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.363602.594238 (Exim 4.92) (envelope-from ) id 1o9qzv-0001Sr-GZ; Fri, 08 Jul 2022 16:38:31 +0000 Received: by outflank-mailman (output) from mailman id 363602.594238; Fri, 08 Jul 2022 16:38:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o9qzv-0001Sk-DZ; Fri, 08 Jul 2022 16:38:31 +0000 Received: by outflank-mailman (input) for mailman id 363602; Fri, 08 Jul 2022 16:38:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o9qzu-0000b9-6F for xen-devel@lists.xenproject.org; Fri, 08 Jul 2022 16:38:30 +0000 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 65044116-fedc-11ec-924f-1f966e50362f; Fri, 08 Jul 2022 18:38:29 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1664C320098A; Fri, 8 Jul 2022 12:38:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 Jul 2022 12:38:27 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Jul 2022 12:38:25 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 65044116-fedc-11ec-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1657298306; x=1657384706; bh=SHamRkjqTyAr3nH7T1rIG7+h7aFHO22A/2u vJRAbcyU=; b=WQh8q0tluMw9RQlOpOae4YI83RM8QU8J+8n2r+/162ToKKVqGPr +m4PTB/UQENz4DC5MmyuXUaOvzypADYc+z8OYanM9BHneOqUH1y2cR/yA/jjJZKZ AGEHEJWRHHkmQX5la9T+dDEnHbJYco8+JL25+SfgV+jVTdXvbFsJLiUwccbEy/Fr yPt2OdUpsjnk6riecXMCxQUS6y8ncL8uLnwahcSHGp/YrQ5PbEdayrOoZ9rZiJ96 zKFIlWSUl+9luYQVi7K/t2TJIouNFOiu25n7L2XN2PSVYeglkzxgVcgBLJy3/t/Y 4pdRlsjt6E0iQ8KTXVCw65K+umfe1DrgGBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1657298306; x=1657384706; bh=SHamRkjqTyAr3 nH7T1rIG7+h7aFHO22A/2uvJRAbcyU=; b=PLBy5hHeQZcX2ypdyoj2GfoatrTHJ EAVwFUWZywMm5VL0vBpSTX9uZvjIrnZFnSg5SpFmDrgEVRpodVTkKK2BuMuvN9E5 H3hH0ljuYpg5kNju1YKYZO/gqq/7IVc3gZt5Rxpg2calW3xutUJ4e1dchS76ko5o LKZem2LM2ssL3FhT5HYcAUev6cDq0SIvy2cVg3n37POMJtIukAJJq9y2nGhAMPE4 HFj8G0Sv86v5Hptzvgrc4Nw+2NdFm6kPxQtQS001UOHz+H7DxGaFbr59/wwboQCd v0oPTHC2i9LC7eP6sJDy59OmctvzeDvr5bNjnnzM8swr/wOPQAocylU2Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeijedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffvghm ihcuofgrrhhivgcuqfgsvghnohhurhcuoeguvghmihesihhnvhhishhisghlvghthhhinh hgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeejffejgffgueegudevvdejkefg hefghffhffejteekleeufeffteffhfdtudehteenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpeguvghmihesihhnvhhishhisghlvghthhhinhhg shhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: iac594737:Fastmail From: Demi Marie Obenour To: Juergen Gross , Greg KH , Stefano Stabellini , Oleksandr Tyshchenko , Demi Marie Obenour Cc: Linux kernel regressions , stable@vger.kernel.org, Linux kernel mailing list , Xen developer discussion Subject: [PATCH 4.19] Ignore failure to unmap -1 Date: Fri, 8 Jul 2022 12:37:45 -0400 Message-Id: <20220708163750.2005-2-demi@invisiblethingslab.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220708163750.2005-1-demi@invisiblethingslab.com> References: <20220708163750.2005-1-demi@invisiblethingslab.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1657298331881100007 Content-Type: text/plain; charset="utf-8" The error paths of gntdev_mmap() can call unmap_grant_pages() even though not all of the pages have been successfully mapped. This will trigger the WARN_ON()s in __unmap_grant_pages_done(). The number of warnings can be very large; I have observed thousands of lines of warnings in the systemd journal. Avoid this problem by only warning on unmapping failure if the handle being unmapped is not -1. The handle field of any page that was not successfully mapped will be -1, so this catches all cases wherr unmapping can legitimately fail. Suggested-by: Juergen Gross Cc: stable@vger.kernel.org Signed-off-by: Demi Marie Obenour Fixes: 73e9e72247b9 ("xen/gntdev: Avoid blocking in unmap_grant_pages()") --- drivers/xen/gntdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 492084814f55d8ed46d2d656db75b28a91dd7f06..27d955c5d9f9076266f77b9fedf= a1a6a2ba08f56 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -416,7 +416,8 @@ static void __unmap_grant_pages_done(int result, unsigned int offset =3D data->unmap_ops - map->unmap_ops; =20 for (i =3D 0; i < data->count; i++) { - WARN_ON(map->unmap_ops[offset+i].status); + WARN_ON(map->unmap_ops[offset+i].status && + map->unmap_ops[offset+i].handle !=3D -1); pr_debug("unmap handle=3D%d st=3D%d\n", map->unmap_ops[offset+i].handle, map->unmap_ops[offset+i].status); --=20 Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab