Re: [PATCH net-next 06/10] vxlan: use __dev_get_by_index instead ofdev_get_by_index to find interface

From: Stephen Hemminger
Date: Tue Jan 14 2014 - 11:51:16 EST


On Tue, 14 Jan 2014 15:41:05 +0800
Ying Xue <ying.xue@xxxxxxxxxxxxx> 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 <stephen@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Ying Xue <ying.xue@xxxxxxxxxxxxx>

Acked-by: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/