[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150817.155654.769418515614784177.davem@davemloft.net>
Date: Mon, 17 Aug 2015 15:56:54 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dsa@...ulusnetworks.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next v2] net: Updates to netif_index_is_vrf
From: David Ahern <dsa@...ulusnetworks.com>
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 <dsa@...ulusnetworks.com>
> ---
> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists