Home
last modified time | relevance | path

Searched hist:baf606d9c9b12517e47e0d1370e8aa9f7323f210 (Results 1 – 2 of 2) sorted by relevance

/linux/net/ipv6/
H A Dipv6_sockglue.cdiff baf606d9c9b12517e47e0d1370e8aa9f7323f210 Wed Mar 18 18:50:42 CET 2015 Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> ipv4,ipv6: grab rtnl before locking the socket

There are some setsockopt operations in ipv4 and ipv6 that are grabbing
rtnl after having grabbed the socket lock. Yet this makes it impossible
to do operations that have to lock the socket when already within a rtnl
protected scope, like ndo dev_open and dev_stop.

We normally take coarse grained locks first but setsockopt inverted that.

So this patch invert the lock logic for these operations and makes
setsockopt grab rtnl if it will be needed prior to grabbing socket lock.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
/linux/net/ipv4/
H A Dip_sockglue.cdiff baf606d9c9b12517e47e0d1370e8aa9f7323f210 Wed Mar 18 18:50:42 CET 2015 Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> ipv4,ipv6: grab rtnl before locking the socket

There are some setsockopt operations in ipv4 and ipv6 that are grabbing
rtnl after having grabbed the socket lock. Yet this makes it impossible
to do operations that have to lock the socket when already within a rtnl
protected scope, like ndo dev_open and dev_stop.

We normally take coarse grained locks first but setsockopt inverted that.

So this patch invert the lock logic for these operations and makes
setsockopt grab rtnl if it will be needed prior to grabbing socket lock.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>