Thread (2 messages) flat view 2 messages, 2 authors, 2015-08-17

Re: [PATCH net-next v2] net: Updates to netif_index_is_vrf

From: David Miller <davem@davemloft.net>
Date: 2015-08-17 22:56:55

From: David Ahern <redacted>
Date: Sun, 16 Aug 2015 07:49:20 -0600
As Eric noted netif_index_is_vrf is not called with rcu_read_lock held,
so wrap the dev_get_by_index_rcu in rcu_read_lock and unlock.

If VRF is not enabled or oif is 0 skip the device lookup. In both cases
index cannot be the VRF master.

Signed-off-by: David Ahern <redacted>
---
v2:
- per Florian's suggestion keep the dev_get_by_index_rcu and wrap with
  rcu_read_lock/unlock versus moving to dev_get_by_index with dev_hold/put
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help