From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965269AbbJ0UAW (ORCPT ); Tue, 27 Oct 2015 16:00:22 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:33000 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932184AbbJ0UAV (ORCPT ); Tue, 27 Oct 2015 16:00:21 -0400 Date: Tue, 27 Oct 2015 14:00:12 -0600 From: Jason Gunthorpe To: "Wan, Kaike" Cc: "Weiny, Ira" , Saurabh Sengar , "dledford@redhat.com" , "Hefty, Sean" , "hal.rosenstock@gmail.com" , "yun.wang@profitbricks.com" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] IB/sa: replace GFP_KERNEL with GFP_ATOMIC Message-ID: <20151027200012.GA7403@obsidianresearch.com> References: <1445960860-3396-1-git-send-email-saurabh.truth@gmail.com> <20151027181235.GA27038@phlsvsds.ph.intel.com> <20151027181652.GA6879@obsidianresearch.com> <3F128C9216C9B84BB6ED23EF16290AFB18571E3F@CRSMSX101.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F128C9216C9B84BB6ED23EF16290AFB18571E3F@CRSMSX101.amr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.160 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2015 at 06:56:50PM +0000, Wan, Kaike wrote: > > I do wonder if it is a good idea to call ib_nl_send_msg with a spinlock held > > though.. Would be nice to see that go away. > > We have to hold the lock to protect against a race condition that a > quick response will try to free the request from the > ib_nl_request_list before we even put it on the list. Put is on the list first? Use a kref? Doesn't look like a big deal to clean this up. Jason