Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753044AbcCGQec (ORCPT ); Mon, 7 Mar 2016 11:34:32 -0500 Received: from mga02.intel.com ([134.134.136.20]:15700 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752681AbcCGQeW convert rfc822-to-8bit (ORCPT ); Mon, 7 Mar 2016 11:34:22 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,552,1449561600"; d="scan'208";a="928633190" From: "Marciniszyn, Mike" To: Nicholas Krause CC: "dledford@redhat.com" , "Hefty, Sean" , "hal.rosenstock@gmail.com" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs Thread-Topic: [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs Thread-Index: AQHReCWpx0EwlikK1UicPs9w7AKQG59OKlMA Date: Mon, 7 Mar 2016 16:34:04 +0000 Message-ID: <32E1700B9017364D9B60AED9960492BC25A7C169@fmsmsx120.amr.corp.intel.com> References: <1457323126-19686-1-git-send-email-xerofoify@gmail.com> In-Reply-To: <1457323126-19686-1-git-send-email-xerofoify@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 29 > This fixes concurrent access in the function, qib_init_iba6120_funcs by locking > around the calls to when setting up f_sendctrl and f_set_armlauch function > pointers to the functions, sendctrl_6120_mod qib_set_6120_armlaunch due to > these functions needing to have their caller to hold the spinlock that is part of > the qib_ibport pointer they are using and due to the lock not being held by > higher up functions in the caller stack we need to hold it in qib_init_iba6210 to > avoid conncurrent access when setting up these function pointers. > I'm not sure I agree. static struct pci_driver qib_driver = { .name = QIB_DRV_NAME, .probe = qib_init_one, .remove = qib_remove_one, .id_table = qib_pci_tbl, .err_handler = &qib_pci_err_handler, }; The only caller is the probe function, which naturally protects since the device cannot be used until the probe returns. Are you actually having an issue with this older version of a qib card? The other board specific routines if this indeed is an issue, would need to be fixed as well since that have the same chip specific routine. Mike