Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753738AbcCGUuE (ORCPT ); Mon, 7 Mar 2016 15:50:04 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33853 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850AbcCGUt4 (ORCPT ); Mon, 7 Mar 2016 15:49:56 -0500 Date: Mon, 7 Mar 2016 22:49:48 +0200 From: Leon Romanovsky To: "Marciniszyn, Mike" Cc: Nicholas Krause , "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 Message-ID: <20160307204948.GI13396@leon.nu> Reply-To: leon@leon.nu Mail-Followup-To: "Marciniszyn, Mike" , Nicholas Krause , "dledford@redhat.com" , "Hefty, Sean" , "hal.rosenstock@gmail.com" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <1457323126-19686-1-git-send-email-xerofoify@gmail.com> <32E1700B9017364D9B60AED9960492BC25A7C169@fmsmsx120.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32E1700B9017364D9B60AED9960492BC25A7C169@fmsmsx120.amr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1660 Lines: 42 On Mon, Mar 07, 2016 at 04:34:04PM +0000, Marciniszyn, Mike wrote: > > 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? IMHO no, The author is famous developer - Nick Krause [1]. [1] http://news.softpedia.com/news/Malevolent-Developer-Trolls-Linux-Kernel-Development-with-Lots-of-Broken-Patches-453709.shtml > > 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 > > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html