From nobody Mon Feb 9 06:32:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5630ACCA47B for ; Fri, 8 Jul 2022 16:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239137AbiGHQjT (ORCPT ); Fri, 8 Jul 2022 12:39:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238087AbiGHQjR (ORCPT ); Fri, 8 Jul 2022 12:39:17 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 058B72250A; Fri, 8 Jul 2022 09:39:17 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 6CC8C3200993; Fri, 8 Jul 2022 12:39:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 Jul 2022 12:39:16 -0400 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= 1657298354; x=1657384754; bh=Bt0vZIuA0Rz6B2Rlr6YNUv8F+fLJYzOFEfj BkkL+cAY=; b=lmMhq9OdTAOEZc2M8YBrhqYYMRSpYYrTeOzweTHgFlAS7KeLide o3OVx3Bg6lIsRiMF66s0XQwZD6cJ8k4FUofUxs6wVCrTue+sA4Gwn7NrA1BxQHHh AOQX4gOBOz+b65OSb8QNe51cNLuNhQ4ujUFREKngnGaDHSNKLYiLlTyuQ1BccURT Q/ABOpk8wgCWIeDzjHsFmS2mwbCw0um+u01728yv5xT0D/H8f9PuYAnV0uzJY8GB xxdJkxB19SYkxmivJ1+48uAqcqGQu1ENIe5/CFPufHt6KgRxo0hUFUAaIifKmm60 ZMl4ZF9UaBUga0PPh83bNJZpfmnGCxVZjXA== 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=1657298354; x=1657384754; bh=Bt0vZIuA0Rz6B 2Rlr6YNUv8F+fLJYzOFEfjBkkL+cAY=; b=b3ajPECKz9aHjqWA19Aga+aejWdNR ouc/27lMZ3zxZ8TodexAhgL90G85eNGXTcYtplRopFnzODsdtF+u/X9ZkjWB2lHt jJcP1rA3cDleZGOeguQqekN459aky+uFQ1KV3TQGUq9xUlfYnJyXC48E25UOouBg h07SslXAzHZ0xy280GaV2MlEnxnfb4dUZbuZq3vvHUDksVBiu603vmjOYQg4MjTq eki61S3Jp7oSpOgYgQy+s/zk2rZVbfNcKjWphn41SjZSWUdx3q28aagXOx0Cve5k Foi5cG3E3c+QrZbKlblOnfmhLbl32boJ9tgfttrx0TXLKrUAZb89ezY+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeijedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffvghm ihcuofgrrhhivgcuqfgsvghnohhurhcuoeguvghmihesihhnvhhishhisghlvghthhhinh hgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeejffejgffgueegudevvdejkefg hefghffhffejteekleeufeffteffhfdtudehteenucevlhhushhtvghrufhiiigvpedune curfgrrhgrmhepmhgrihhlfhhrohhmpeguvghmihesihhnvhhishhisghlvghthhhinhhg shhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: iac594737:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Jul 2022 12:39:14 -0400 (EDT) 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 5.10] Ignore failure to unmap -1 Date: Fri, 8 Jul 2022 12:37:48 -0400 Message-Id: <20220708163750.2005-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 where unmapping can legitimately fail. Suggested-by: Juergen Gross Cc: stable@vger.kernel.org Signed-off-by: Demi Marie Obenour Fixes: 79963021fd71 ("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 f415c056ff8ab8d808ee2bacfaa3cad57af28204..54fee4087bf1078803c230ad208= 1aafa8415cf53 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -401,7 +401,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