Re: [PATCH] net: Updates to netif_index_is_vrf

2015-08-16 Thread David Ahern
On 8/15/15 6:39 PM, Florian Westphal wrote: David Ahern wrote: As Eric noted netif_index_is_vrf is not called with rcu_read_lock held, so use dev_get_by_index instead of dev_get_by_index_rcu. If VRF is not enabled or oif is 0 skip the device lookup. Signed-off-by: David Ahern Why not s

Re: [PATCH] net: Updates to netif_index_is_vrf

2015-08-15 Thread Florian Westphal
David Ahern wrote: > As Eric noted netif_index_is_vrf is not called with rcu_read_lock held, > so use dev_get_by_index instead of dev_get_by_index_rcu. > > If VRF is not enabled or oif is 0 skip the device lookup. > > Signed-off-by: David Ahern Why not > static inline bool netif_index_is_vrf

[PATCH] net: Updates to netif_index_is_vrf

2015-08-15 Thread David Ahern
As Eric noted netif_index_is_vrf is not called with rcu_read_lock held, so use dev_get_by_index instead of dev_get_by_index_rcu. If VRF is not enabled or oif is 0 skip the device lookup. Signed-off-by: David Ahern --- include/linux/netdevice.h | 14 +++--- 1 file changed, 11 insertions(