From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: [PATCH for-next 2/3] IB/core: Change per-entry lock in RoCE GID table to one lock Date: Wed, 30 Dec 2015 08:01:12 +0200 Message-ID: <56837328.8000902@mellanox.com> References: <1446043961-17667-1-git-send-email-matanb@mellanox.com> <1446043961-17667-3-git-send-email-matanb@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1446043961-17667-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matan Barak Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Majd Dibbiny , Eran Ben Elisha List-Id: linux-rdma@vger.kernel.org On 10/28/2015 4:52 PM, Matan Barak wrote: > @@ -134,16 +138,14 @@ static int write_gid(struct ib_device *ib_dev, u8 port, > { > int ret = 0; > struct net_device *old_net_dev; > - unsigned long flags; > > /* in rdma_cap_roce_gid_table, this funciton should be protected by a > * sleep-able lock. > */ > - write_lock_irqsave(&table->data_vec[ix].lock, flags); > > if (rdma_cap_roce_gid_table(ib_dev, port)) { > table->data_vec[ix].props |= GID_TABLE_ENTRY_INVALID; > - write_unlock_irqrestore(&table->data_vec[ix].lock, flags); > + write_unlock_irq(&table->rwlock); > /* GID_TABLE_WRITE_ACTION_MODIFY currently isn't supported by > * RoCE providers and thus only updates the cache. > */ > @@ -153,7 +155,7 @@ static int write_gid(struct ib_device *ib_dev, u8 port, > else if (action == GID_TABLE_WRITE_ACTION_DEL) > ret = ib_dev->del_gid(ib_dev, port, ix, > &table->data_vec[ix].context); > - write_lock_irqsave(&table->data_vec[ix].lock, flags); > + write_lock_irq(&table->rwlock); > } sparse complains on drivers/infiniband/core/cache.c:186:17: warning: context imbalance in 'write_gid' - unexpected unlock is this false positive? Or. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html