From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haggai Eran Subject: Re: [PATCH v4 for-next 03/12] IB/core: Find the network namespace matching connection parameters Date: Wed, 20 May 2015 17:48:36 +0300 Message-ID: <555C9EC4.3010802@mellanox.com> References: <1431841868-28063-1-git-send-email-haggaie@mellanox.com> <1431841868-28063-4-git-send-email-haggaie@mellanox.com> <20150519182616.GF18675@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: Doug Ledford , , , Liran Liss , Guy Shapiro , Shachar Raindel , Yotam Kenneth To: Jason Gunthorpe Return-path: In-Reply-To: <20150519182616.GF18675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 19/05/2015 21:26, Jason Gunthorpe wrote: >> + list_for_each_entry_rcu(client, &client_list, list) >> + if (client->get_net_device_by_port_pkey_ip) { >> + ret = client->get_net_device_by_port_pkey_ip(dev, port, >> + pkey, >> + >> addr); > > Considering the patch that introduced the rwsem, this doesn't look > right. > > We can't call a client call back on a device that is unregistered, we > can't call a client call back on a client that is unregistering. > > So the ordering of the list_del/add vs call back calls in device.c is > not right, please audit everything with an eye toward maintaing sane > invarients. Thanks for pointing that out. I'll do that. Haggai -- 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