diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-01 08:44:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-01 08:44:05 +0200 |
commit | b1faf5666438090a4dc4fceac8502edc7788b7e3 (patch) | |
tree | f90808dea27cc38aff6feed1782e2a5666fa6ee9 /net/ipv4 | |
parent | greth: Fix build after OF device conversions. (diff) | |
download | linux-b1faf5666438090a4dc4fceac8502edc7788b7e3.tar.xz linux-b1faf5666438090a4dc4fceac8502edc7788b7e3.zip |
net: sock_queue_err_skb() dont mess with sk_forward_alloc
Correct sk_forward_alloc handling for error_queue would need to use a
backlog of frames that softirq handler could not deliver because socket
is owned by user thread. Or extend backlog processing to be able to
process normal and error packets.
Another possibility is to not use mem charge for error queue, this is
what I implemented in this patch.
Note: this reverts commit 29030374
(net: fix sk_forward_alloc corruptions), since we dont need to lock
socket anymore.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 50678f9a2763..eec4ff456e33 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -633,11 +633,9 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable) if (!inet->recverr) { if (!harderr || sk->sk_state != TCP_ESTABLISHED) goto out; - } else { - bh_lock_sock(sk); + } else ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); - bh_unlock_sock(sk); - } + sk->sk_err = err; sk->sk_error_report(sk); out: |