Thread (2 messages) 2 messages, 2 authors, 2016-09-26

Re: [PATCH net] ipmr, ip6mr: fix scheduling while atomic and a deadlock with ipmr_get_route

flat view

From: David Miller <davem@davemloft.net>
Date: 2016-09-26 03:42:43

From: Nikolay Aleksandrov <redacted>
Date: Sun, 25 Sep 2016 23:08:31 +0200
Since the commit below the ipmr/ip6mr rtnl_unicast() code uses the portid
instead of the previous dst_pid which was copied from in_skb's portid.
Since the skb is new the portid is 0 at that point so the packets are sent
to the kernel and we get scheduling while atomic or a deadlock (depending
on where it happens) by trying to acquire rtnl two times.
Also since this is RTM_GETROUTE, it can be triggered by a normal user.

Here's the sleeping while atomic trace:
 ...
Fixes: 2942e9005056 ("[RTNETLINK]: Use rtnl_unicast() for rtnetlink unicasts")
Signed-off-by: Nikolay Aleksandrov <redacted>
This approach looks fine to me, applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help