Home
last modified time | relevance | path

Searched hist:"55 b8050353c4a212c94d7156e2bd5885225b869b" (Results 1 – 2 of 2) sorted by relevance

/linux/net/ipv6/
H A Dipv6_sockglue.cdiff 55b8050353c4a212c94d7156e2bd5885225b869b Mon Oct 19 08:41:58 CEST 2009 Eric Dumazet <eric.dumazet@gmail.com> net: Fix IP_MULTICAST_IF

ipv4/ipv6 setsockopt(IP_MULTICAST_IF) have dubious __dev_get_by_index() calls.

This function should be called only with RTNL or dev_base_lock held, or reader
could see a corrupt hash chain and eventually enter an endless loop.

Fix is to call dev_get_by_index()/dev_put().

If this happens to be performance critical, we could define a new dev_exist_by_index()
function to avoid touching dev refcount.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/linux/net/ipv4/
H A Dip_sockglue.cdiff 55b8050353c4a212c94d7156e2bd5885225b869b Mon Oct 19 08:41:58 CEST 2009 Eric Dumazet <eric.dumazet@gmail.com> net: Fix IP_MULTICAST_IF

ipv4/ipv6 setsockopt(IP_MULTICAST_IF) have dubious __dev_get_by_index() calls.

This function should be called only with RTNL or dev_base_lock held, or reader
could see a corrupt hash chain and eventually enter an endless loop.

Fix is to call dev_get_by_index()/dev_put().

If this happens to be performance critical, we could define a new dev_exist_by_index()
function to avoid touching dev refcount.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>