[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1385659390.5352.20.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 28 Nov 2013 09:23:10 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: jongman.heo@...sung.com, David Miller <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: [PATCH] udp: fix possible seqlock deadlock
From: Eric Dumazet <edumazet@...gle.com>
In commit c9e9042994d3 ("ipv4: fix possible seqlock deadlock") I left
another spot where IP_INC_STATS_BH() was improperly used.
udp_sendmsg() is called from process context, not from softirq context.
This was detected by lockdep seqlock support.
Reported-by: jongman heo <jongman.heo@...sung.com>
Fixes: 584bdf8cbdf6 ("[IPV4]: Fix "ipOutNoRoutes" counter error for TCP and UDP")
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Cc: Hannes Frederic Sowa <hannes@...essinduktion.org>
---
net/ipv4/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 44dfaa09b584..44e3884f9e4c 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -999,7 +999,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
err = PTR_ERR(rt);
rt = NULL;
if (err == -ENETUNREACH)
- IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
+ IP_INC_STATS(net, IPSTATS_MIB_OUTNOROUTES);
goto out;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists