All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: ipv4: remove disable of bottom half in inet_rtm_getroute
@ 2017-01-08  4:04 David Ahern
  2017-01-09 18:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2017-01-08  4:04 UTC (permalink / raw)
  To: netdev; +Cc: David Ahern

Nothing about the route lookup requires bottom half to be disabled.
Remove the local_bh_disable ... local_bh_enable around ip_route_input.
This appears to be a vestige of days gone by as it has been there
since the beginning of git time.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
 net/ipv4/route.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index f51823dc998b..7144288371cf 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2631,9 +2631,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
 		skb->protocol	= htons(ETH_P_IP);
 		skb->dev	= dev;
 		skb->mark	= mark;
-		local_bh_disable();
 		err = ip_route_input(skb, dst, src, rtm->rtm_tos, dev);
-		local_bh_enable();
 
 		rt = skb_rtable(skb);
 		if (err == 0 && rt->dst.error)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: ipv4: remove disable of bottom half in inet_rtm_getroute
  2017-01-08  4:04 [PATCH net-next] net: ipv4: remove disable of bottom half in inet_rtm_getroute David Ahern
@ 2017-01-09 18:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-01-09 18:55 UTC (permalink / raw)
  To: dsa; +Cc: netdev

From: David Ahern <dsa@cumulusnetworks.com>
Date: Sat,  7 Jan 2017 20:04:23 -0800

> Nothing about the route lookup requires bottom half to be disabled.
> Remove the local_bh_disable ... local_bh_enable around ip_route_input.
> This appears to be a vestige of days gone by as it has been there
> since the beginning of git time.
> 
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>

Agreed, this shouldn't be necessary.

The key with input route lookups is that the skb->dst reference cannot
escape the packet receive path, unless we force the dst, which
ip_route_input() does under RCU protection.

So this should all be ok.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-09 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-08  4:04 [PATCH net-next] net: ipv4: remove disable of bottom half in inet_rtm_getroute David Ahern
2017-01-09 18:55 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.