From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51C97C7618B for ; Tue, 23 Jul 2019 11:58:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25DDE21655 for ; Tue, 23 Jul 2019 11:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563883085; bh=vXB6bmoL59ExTu2n+IgNbT8hjXijn1e465jpQg9qh8U=; h=Subject:To:Cc:From:Date:List-ID:From; b=fSBPiyAKNxF9ptyyyCX0GzaZnVZjr7Ux0qh/gGjSTjVjHet6dy/hX2wvQ4Hx2zf+v aVuWNfNIlzpi9oWgNDz+/01flDIww9w2RcIlzrl7o/bM3eucF8gnIaz61+3diU8e4Z WJS8s1ftDb9nd+amKCNicbJWbnN0kP+yAe/G5BHg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731091AbfGWL6E (ORCPT ); Tue, 23 Jul 2019 07:58:04 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60439 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728418AbfGWL6E (ORCPT ); Tue, 23 Jul 2019 07:58:04 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 763142089D; Tue, 23 Jul 2019 07:58:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 23 Jul 2019 07:58:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=+v+Qnw 5cB5JSZiQlu/NqhFWkAZKI0uLphHw6cjWJykg=; b=WSQdUvd6+w09XrgKYVoMoz 2G6B0L+7NcDICL7X08A8m6kzdrHnAF5o5NnP+EfEoqHhvXchWDMslyoxEl2j4ukh 5uM9jO3Ngc+3dnwm7GXyEqvGODC2fk3X4qZMF+qnurJaWq5nDOEq5fws4O+G/tRj q+6Y3u2Wq1zGrBN+ijAB5yzjnxkwJuksr3+NYMkDNv67oBFTboLkY4TvH9xNu+UN Jkgu3jHAY8A8UXEQoOFwZe/thUxPsj81tS6VEyYyOrya3wfg9tZ4rgM+QN7fbpMB hYEMuRyx2MYGtfLpdb1MGVLohh7xIkjDJ0nyYJdV1WxDgd6Hhwn+4VzAX1v02NDQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrjeekgdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedv X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id DAC09380076; Tue, 23 Jul 2019 07:58:02 -0400 (EDT) Subject: FAILED: patch "[PATCH] RDMA/odp: Fix missed unlock in non-blocking invalidate_start" failed to apply to 4.19-stable tree To: jgg@mellanox.com, dledford@redhat.com, leonro@mellanox.com, stable@vger.kernel.org Cc: From: Date: Tue, 23 Jul 2019 13:58:00 +0200 Message-ID: <15638830801659@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 7608bf40cf2480057ec0da31456cc428791c32ef Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Tue, 11 Jun 2019 13:09:51 -0300 Subject: [PATCH] RDMA/odp: Fix missed unlock in non-blocking invalidate_start If invalidate_start returns with EAGAIN then the umem_rwsem needs to be unlocked as no invalidate_end will be called. Cc: Fixes: ca748c39ea3f ("RDMA/umem: Get rid of per_mm->notifier_count") Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index 9001cc10770a..eb9939d52818 100644 --- a/drivers/infiniband/core/umem_odp.c +++ b/drivers/infiniband/core/umem_odp.c @@ -149,6 +149,7 @@ static int ib_umem_notifier_invalidate_range_start(struct mmu_notifier *mn, { struct ib_ucontext_per_mm *per_mm = container_of(mn, struct ib_ucontext_per_mm, mn); + int rc; if (mmu_notifier_range_blockable(range)) down_read(&per_mm->umem_rwsem); @@ -165,11 +166,14 @@ static int ib_umem_notifier_invalidate_range_start(struct mmu_notifier *mn, return 0; } - return rbt_ib_umem_for_each_in_range(&per_mm->umem_tree, range->start, - range->end, - invalidate_range_start_trampoline, - mmu_notifier_range_blockable(range), - NULL); + rc = rbt_ib_umem_for_each_in_range(&per_mm->umem_tree, range->start, + range->end, + invalidate_range_start_trampoline, + mmu_notifier_range_blockable(range), + NULL); + if (rc) + up_read(&per_mm->umem_rwsem); + return rc; } static int invalidate_range_end_trampoline(struct ib_umem_odp *item, u64 start,