From patchwork Tue Apr 30 14:23:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10923711 X-Patchwork-Delegate: jgg@ziepe.ca 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 52DE514C0 for ; Tue, 30 Apr 2019 14:25:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 423AD288D8 for ; Tue, 30 Apr 2019 14:25:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3592B28915; Tue, 30 Apr 2019 14:25:24 +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, UNPARSEABLE_RELAY 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 09F60288D8 for ; Tue, 30 Apr 2019 14:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbfD3OZW (ORCPT ); Tue, 30 Apr 2019 10:25:22 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:47094 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfD3OZV (ORCPT ); Tue, 30 Apr 2019 10:25:21 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3UEOTiX053601; Tue, 30 Apr 2019 14:25:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2018-07-02; bh=P8qIxx5y2+atTJF39SPyZ9UKLK0ArIcXYp8wErranJw=; b=pqcAFOQzPPhCLdBTqe99DJa+RJzSBMM1GdJ4V0cHCq0RQQcOiChFB56TIPseo/hjpQ5P 4cfIfS9D/MKLg9e6WT0oA87dzX16G52xBhs1vfGFnhg+KNUFLQ5zkHxnF3/+gokRPJlQ quHyYU8HMpVnu7KBViO2qV1TLxEhVE/vrDsWVPJC1Y9ZE07N0Cct9ySTEk38j54bnUoL dnZF/P+xAwpzJHXbnX9VMsDulFAB7DlC/r7WzkcoBqhb/ZE1s4+iSF7Qa1NeFdsI4+jg nKZD71semrmkGko/DsWgIjf5T4D3EeREuIpzT2Xo/MRP3eqyxHu9nEF0rzYpuEgvrgf3 OA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2s5j5u1jm5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2019 14:25:07 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3UENZWq095091; Tue, 30 Apr 2019 14:25:06 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 2s4yy9jutj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2019 14:25:06 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x3UEP4Fd024780; Tue, 30 Apr 2019 14:25:04 GMT Received: from srabinov-laptop.nl.oracle.com (/10.175.1.252) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 30 Apr 2019 07:25:04 -0700 From: Shamir Rabinovitch To: jgg@ziepe.ca, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Shamir Rabinovitch , Leon Romanovsky , Yishai Hadas Subject: [PATCH for-next v1 1/4] RDMA/uverbs: initialize uverbs_attr_bundle ucontext in ib_uverbs_get_context Date: Tue, 30 Apr 2019 17:23:21 +0300 Message-Id: <20190430142333.31063-2-shamir.rabinovitch@oracle.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190430142333.31063-1-shamir.rabinovitch@oracle.com> References: <20190430142333.31063-1-shamir.rabinovitch@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9242 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904300090 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9242 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904300091 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 ib_uverbs_get_context does not have uobject so it does not call the rdma_lookup_get_uobject which is used to set up the uverbs_attr_bundle ucontext. for ib_uverbs_get_context we need to set up this manually before we send the uverbs_attr_bundle down to the driver layer. this complete the change that was done in ("70f06b26f07e IB: ucontext should be set properly for all cmd & ioctl paths") Signed-off-by: Shamir Rabinovitch --- drivers/infiniband/core/uverbs_cmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 04d08135b374..76ac113d1da5 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -230,6 +230,8 @@ static int ib_uverbs_get_context(struct uverbs_attr_bundle *attrs) goto err_alloc; } + attrs->context = ucontext; + ucontext->res.type = RDMA_RESTRACK_CTX; ucontext->device = ib_dev; ucontext->cg_obj = cg_obj;