From patchwork Sat Jan 12 02:31:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10760869 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6851791E for ; Sat, 12 Jan 2019 02:31:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54F612A134 for ; Sat, 12 Jan 2019 02:31:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4438B2A0EE; Sat, 12 Jan 2019 02:31:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1BD82A0EE for ; Sat, 12 Jan 2019 02:31:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbfALCbg (ORCPT ); Fri, 11 Jan 2019 21:31:36 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35341 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbfALCbg (ORCPT ); Fri, 11 Jan 2019 21:31:36 -0500 Received: by mail-pl1-f196.google.com with SMTP id p8so7578657plo.2 for ; Fri, 11 Jan 2019 18:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EEwCLflHAolYey/UTR0T3hyOHwSbxjR2Nms5XHX/rrY=; b=lcfnry5JFfkVJjsGJJqPJrIpxoYfVnfSVcSrvgRNX3QdZdKl1MX8MLlXZELErntG6B O9LyO8l/kW15GVLGdf8ReDI8cKHMr7iLQ7Oq0JAFFLOoaQsp/SUzhQ/t3vlKvucDk1Wl g94MpjAG7kB27Njc1E39u245gwF6aPETkAj9/L23CzIcz3Nqn6qtxw0bzhmP1SxcOKu9 GhgasGUyyXluUus4S9/K7Em2I/+8ONRQqs+xXTdjdVqc2iEqFpzzAzvIlMIgDXYGqtjo i0Xlo3g64RSwzjLLCSORecxzkpYFj/d/ZBppiUvis/WZdJCJZcvn7muWW3LEJUPb5PAG 9e2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EEwCLflHAolYey/UTR0T3hyOHwSbxjR2Nms5XHX/rrY=; b=b5BKeXIxfom1oZ5ljS1XYFhKW97sqwpectCok/oifYWbLaFtVbRJouZsFgHJW5ZiSH bKaM88O2lChiXYrH4bCUnUubQY6OVn0hdNOE2ToEhSTVllTSuPBJOYserNvfzAT6hbDR Ybol/SsxNjKtMryFNMTyq8y3G8OyGV5A1qdmBAvS2oGLHKqcY6ix5xHEneRzylIoD0rz NFV9Ndwiuk/trWWszFdcx+lej0vEeTAfZgLVPdG4/XjJYqLj01xQZD1mlIphxlGvDjNO CmMpfxjMTmCr8ptQF3PX5TlaqgbKHRepNCpkgtTR+Hj1eVC/zoMZrpARrRR1T+46LHIW 8FjQ== X-Gm-Message-State: AJcUukdYIbWCEnAOjM9dFUi6iBcNi2/zo1sB9pUFArzNkJpDjxE4Rouf 96tR0az9Yb2Bgub0Je7tXtCimZKremw= X-Google-Smtp-Source: ALg8bN4U/1VP29R5pahxUGNDbUafIY5Sgl7NyU67Cn+Xr1LoQT/pEOaX8T+z1FfZ24hLxpRjTV5qfg== X-Received: by 2002:a17:902:bc44:: with SMTP id t4mr16866393plz.260.1547260295218; Fri, 11 Jan 2019 18:31:35 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id y71sm164812479pfi.123.2019.01.11.18.31.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 18:31:33 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gi95A-0006N4-U7; Fri, 11 Jan 2019 19:31:32 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org, Moni Shoua Cc: Jason Gunthorpe Subject: [PATCH for-rc 0/2] Fix poor reference counting in advice_mr work Date: Fri, 11 Jan 2019 19:31:22 -0700 Message-Id: <20190112023124.21647-1-jgg@ziepe.ca> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe Work needs to hold a reference on the pointers that it plans to use otherwise they can become free'd or unregistered. Expose the existing registration lock that netlink uses for this purpose. Jason Gunthorpe (2): RDMA/device: Expose ib_device_try_get(() IB/mlx5: Fix how advise_mr() launches async work drivers/infiniband/core/core_priv.h | 1 - drivers/infiniband/core/device.c | 6 +++--- drivers/infiniband/hw/mlx5/odp.c | 10 +++++----- include/rdma/ib_verbs.h | 24 ++++++++++++++++++++++-- 4 files changed, 30 insertions(+), 11 deletions(-)