]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/udp.c
udp: Drop socket lock for encapsulated packets
[linux-2.6-omap-h63xx.git] / net / ipv4 / udp.c
index 383d17359d01f1a81080df5aabef22266c1dd1c4..8e42fbbd57616316df2692a39379398f9486ac22 100644 (file)
@@ -989,7 +989,9 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
                    up->encap_rcv != NULL) {
                        int ret;
 
+                       bh_unlock_sock(sk);
                        ret = (*up->encap_rcv)(sk, skb);
+                       bh_lock_sock(sk);
                        if (ret <= 0) {
                                UDP_INC_STATS_BH(sock_net(sk),
                                                 UDP_MIB_INDATAGRAMS,
@@ -1092,7 +1094,7 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
                        if (skb1) {
                                int ret = 0;
 
-                               bh_lock_sock_nested(sk);
+                               bh_lock_sock(sk);
                                if (!sock_owned_by_user(sk))
                                        ret = udp_queue_rcv_skb(sk, skb1);
                                else
@@ -1194,7 +1196,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[],
 
        if (sk != NULL) {
                int ret = 0;
-               bh_lock_sock_nested(sk);
+               bh_lock_sock(sk);
                if (!sock_owned_by_user(sk))
                        ret = udp_queue_rcv_skb(sk, skb);
                else