From patchwork Tue May 26 13:03:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 6480311 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D4B8F9F1C1 for ; Tue, 26 May 2015 13:22:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9FA8203F1 for ; Tue, 26 May 2015 13:22:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBF222041D for ; Tue, 26 May 2015 13:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752312AbbEZNU5 (ORCPT ); Tue, 26 May 2015 09:20:57 -0400 Received: from mail-bl2on0099.outbound.protection.outlook.com ([65.55.169.99]:14016 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753131AbbEZNUO (ORCPT ); Tue, 26 May 2015 09:20:14 -0400 Received: from BY2PR02CA0087.namprd02.prod.outlook.com (10.242.32.45) by BY2PR02MB281.namprd02.prod.outlook.com (10.242.236.142) with Microsoft SMTP Server (TLS) id 15.1.172.22; Tue, 26 May 2015 13:03:51 +0000 Received: from BY2FFO11FD041.protection.gbl (2a01:111:f400:7c0c::151) by BY2PR02CA0087.outlook.office365.com (2a01:111:e400:2c2a::45) with Microsoft SMTP Server (TLS) id 15.1.172.22 via Frontend Transport; Tue, 26 May 2015 13:03:51 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BY2FFO11FD041.mail.protection.outlook.com (10.1.14.226) with Microsoft SMTP Server id 15.1.172.14 via Frontend Transport; Tue, 26 May 2015 13:03:50 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id A5.B6.06265.63F64655; Tue, 26 May 2015 06:03:50 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.224.2; Tue, 26 May 2015 06:03:50 -0700 X-AuditID: ac160a69-f790f6d000001879-ad-55646f364e20 Received: from [10.50.231.52] ( [10.177.8.100]) by milsmgip11.sandisk.com (Symantec Messaging Gateway) with SMTP id 93.68.03643.53F64655; Tue, 26 May 2015 06:03:50 -0700 (PDT) Message-ID: <55646F34.9010803@sandisk.com> Date: Tue, 26 May 2015 15:03:48 +0200 From: Bart Van Assche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Doug Ledford CC: Shlomo Pongratz , linux-rdma Subject: [PATCH] IB/ipoib: Fix RCU annotations in ipoib_neigh_hash_init() X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsWyRoxnka5ZfkqowbldyhYvz39gtXh2qJfF 4v3HfjYHZo9n0w8zebzfd5XN4/MmuQDmKC6blNSczLLUIn27BK6MCzOPsRa846xoejufpYFx PUcXIyeHhICJxPxpRxkhbDGJC/fWs3UxcnEICZxglJj39xkThLODUWLtikVMMB1TF3awQiQ2 M0qcOvuMHSTBK6Al8WDfHrAiFgFVib5jG1hBbDYBI4lv72eydDFycIgKhEns2aMKUS4ocXLm ExYQW0RATWLTq0XsICXMAqESpx+ZgoSFBTw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soft-Exchange-Diagnostics: 1; BY2FFO11FD041; 1:kfoOq3DV7yWayGQFARwBWpbVkd6X5Pq5coRmedZ96cbERNMonum0BoXKbNQ3pyegllMOvmMSXQD4vwdEw94W4RcgYot4REFPyZRh5tjS/u2RHAsk3s+q4M34foPMQn4nUuGNtmizRfwfzcOzxBMQMMhHGwFW94yMlsxKBlcPlhb4IVrpuYhI3SF+N7HO7HU52ZgFxv1MLG1TndBgVyTXqVeInhh+/pEcXsGzPMM/AcYFKbXKRx5eMfGLKsnQb/yGvxCcH2mCEWstFvJDquL40/8V7keBvAg9LN6ichPv1AY= X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(189002)(86362001)(47776003)(68736005)(77156002)(92566002)(87266999)(83506001)(54356999)(50986999)(36756003)(99136001)(33656002)(62966003)(19580405001)(64706001)(229853001)(189998001)(80316001)(69596002)(19580395003)(87936001)(4001540100001)(64126003)(50466002)(81156007)(46102003)(5001860100001)(5001830100001)(65806001)(65956001)(106466001)(4001350100001)(5001920100001)(5001960100002)(23676002)(65816999)(97736004)(77096005)(110136002)(59896002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB281; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:ErrorRetry; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB281; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520002)(3002001); SRVR:BY2PR02MB281; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB281; X-Forefront-PRVS: 0588B2BD96 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2015 13:03:50.8301 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB281 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid that sparse complains about ipoib_neigh_hash_init(). This patch does not change any functionality. See also patch "IPoIB: Fix memory leak in the neigh table deletion flow" (commit ID 66172c09938b). Signed-off-by: Bart Van Assche Cc: Shlomo Pongratz --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 9e1b203..fec8207 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1128,7 +1128,7 @@ static int ipoib_neigh_hash_init(struct ipoib_dev_priv *priv) { struct ipoib_neigh_table *ntbl = &priv->ntbl; struct ipoib_neigh_hash *htbl; - struct ipoib_neigh **buckets; + struct ipoib_neigh __rcu **buckets; u32 size; clear_bit(IPOIB_NEIGH_TBL_FLUSH, &priv->flags); @@ -1146,7 +1146,7 @@ static int ipoib_neigh_hash_init(struct ipoib_dev_priv *priv) htbl->size = size; htbl->mask = (size - 1); htbl->buckets = buckets; - ntbl->htbl = htbl; + RCU_INIT_POINTER(ntbl->htbl, htbl); htbl->ntbl = ntbl; atomic_set(&ntbl->entries, 0);