Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752101AbaANQvL (ORCPT ); Tue, 14 Jan 2014 11:51:11 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:35450 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbaANQvJ (ORCPT ); Tue, 14 Jan 2014 11:51:09 -0500 Date: Tue, 14 Jan 2014 08:51:05 -0800 From: Stephen Hemminger To: Ying Xue Cc: , , , , , , , , Subject: Re: [PATCH net-next 06/10] vxlan: use __dev_get_by_index instead of dev_get_by_index to find interface Message-ID: <20140114085105.706779c1@nehalam.linuxnetplumber.net> In-Reply-To: <1389685269-18600-7-git-send-email-ying.xue@windriver.com> References: <1389685269-18600-1-git-send-email-ying.xue@windriver.com> <1389685269-18600-7-git-send-email-ying.xue@windriver.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jan 2014 15:41:05 +0800 Ying Xue wrote: > The following call chains indicate that vxlan_fdb_parse() is > under rtnl_lock protection. So if we use __dev_get_by_index() > instead of dev_get_by_index() to find interface handler in it, > this would help us avoid to change interface reference counter. > > rtnetlink_rcv() > rtnl_lock() > netlink_rcv_skb() > rtnl_fdb_add() > vxlan_fdb_add() > vxlan_fdb_parse() > rtnl_unlock() > > rtnetlink_rcv() > rtnl_lock() > netlink_rcv_skb() > rtnl_fdb_del() > vxlan_fdb_del() > vxlan_fdb_parse() > rtnl_unlock() > > Cc: Stephen Hemminger > Signed-off-by: Ying Xue Acked-by: Stephen Hemminger -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/