Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp685459imw; Fri, 8 Jul 2022 09:51:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+tSZqDbfZSerehkTyeGdLymQu229aWRblGdWmznBCkGr2qtidPtoYXM+qRmlgiva6TBhd X-Received: by 2002:a05:6402:27cf:b0:435:dae6:26aa with SMTP id c15-20020a05640227cf00b00435dae626aamr5904118ede.323.1657299071180; Fri, 08 Jul 2022 09:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657299071; cv=none; d=google.com; s=arc-20160816; b=ALuVtJtAhzhpdaJbNSv+O7JsGIfyVllMJ0MwnUcDGHnCEjzg8GT0QuatU3I8YxP1gv kWM2uLVjcGxz4TMgpbi0KniIu517Uji0bR08YTgcdjg5lOei9df34W2/w7GMeZssIXZ6 5h1SIOZh1CxUjiYlxD3MBQCaIA5ytpKi6cBG7jZURRzlynuAjlgJD2rKWNaP1+Qom6Av w0qEIA+IYCYXaBsBrw/BmlNBZXtP5fdxiuDG+Bi/OaeFCAuLpNzfO31bLp3dVV4oca+y swJPVXgyUjo7LAAA/Y8/jMKfHRWNi6lVD1VW/Hf90/ui5iM1a75LjS+fee3O/G2ldazB ZxGA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=SHamRkjqTyAr3nH7T1rIG7+h7aFHO22A/2uvJRAbcyU=; b=vpzM+mHvMBZc2nMuI0C7sufHIg932g/38OkaApyrOEBGSwIIVf/nusGbK6Ae43mPxH j3Wvs8/HScPyPDuX4WCZpVwlisY7BB/DKoKFU9J344H5KaecRrN50W17a8HwGnm3deff Gnr9+xIAL9x+BHOcRFc4IzAxVMa9WVphZgAS4NHcYsouxh+SUDYFs8pxikyzC766PUu3 +yL0YjxxF2p4ixARiekZKDpgmgmFiYIE3yt1l9DcSP0ksYA5/myYuO3T/7r6jYUsf8Zo Z3WBYJXTjqz0ApbvqKXP2SrrNqz2XJvsczyvKPZNrHYnZKNLuGnBHQdyqTvnFYmnI8Fy N51w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@invisiblethingslab.com header.s=fm2 header.b=WQh8q0tl; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=PLBy5hHe; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne33-20020a1709077ba100b0072b10e05120si10447046ejc.297.2022.07.08.09.50.44; Fri, 08 Jul 2022 09:51:11 -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=@invisiblethingslab.com header.s=fm2 header.b=WQh8q0tl; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=PLBy5hHe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238896AbiGHQib (ORCPT + 99 others); Fri, 8 Jul 2022 12:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237557AbiGHQi3 (ORCPT ); Fri, 8 Jul 2022 12:38:29 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 567B3B35; Fri, 8 Jul 2022 09:38:28 -0700 (PDT) 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 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 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Jul 2022 12:38:25 -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 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: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,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 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..27d955c5d9f9076266f77b9fedfa1a6a2ba08f56 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 = data->unmap_ops - map->unmap_ops; for (i = 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 != -1); pr_debug("unmap handle=%d st=%d\n", map->unmap_ops[offset+i].handle, map->unmap_ops[offset+i].status); -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab