Willem de Bruijn
364a9e9324
sock: deduplicate errqueue dequeue
...
sk->sk_error_queue is dequeued in four locations. All share the
exact same logic. Deduplicate.
Also collapse the two critical sections for dequeue (at the top of
the recv handler) and signal (at the bottom).
This moves signal generation for the next packet forward, which should
be harmless.
It also changes the behavior if the recv handler exits early with an
error. Previously, a signal for follow-up packets on the errqueue
would then not be scheduled. The new behavior, to always signal, is
arguably a bug fix.
For rxrpc, the change causes the same function to be called repeatedly
for each queued packet (because the recv handler == sk_error_report).
It is likely that all packets will fail for the same reason (e.g.,
memory exhaustion).
This code runs without sk_lock held, so it is not safe to trust that
sk->sk_err is immutable inbetween releasing q->lock and the subsequent
test. Introduce int err just to avoid this potential race.
Signed-off-by: Willem de Bruijn <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2014-09-01 21:49:08 -07:00
..
netfilter
net: use reciprocal_scale() helper
2014-08-23 12:21:21 -07:00
af_inet.c
net-gre-gro: Fix a bug that breaks the forwarding path
2014-07-16 14:45:26 -07:00
ah4.c
arp.c
cipso_ipv4.c
netlabel: shorter names for the NetLabel catmap funcs/structs
2014-08-01 11:17:37 -04:00
datagram.c
net: Save TX flow hash in sock and set in skbuf on xmit
2014-07-07 21:14:21 -07:00
devinet.c
ipv4: fail early when creating netdev named all or default
2014-07-29 11:43:50 -07:00
esp4.c
fib_frontend.c
ipv4: Restore accept_local behaviour in fib_validate_source()
2014-08-22 12:23:10 -07:00
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c
list: fix order of arguments for hlist_add_after(_rcu)
2014-08-06 18:01:24 -07:00
gre_demux.c
gre: Add support for checksum unnecessary conversions
2014-09-01 21:36:28 -07:00
gre_offload.c
gre: Add support for checksum unnecessary conversions
2014-09-01 21:36:28 -07:00
icmp.c
ipv4: remove nested rcu_read_lock/unlock
2014-08-02 15:27:35 -07:00
igmp.c
net/ipv4/igmp.c: Replace rcu_dereference() with rcu_access_pointer()
2014-08-22 12:23:10 -07:00
inet_connection_sock.c
inet_diag.c
inet_fragment.c
inet: frags: use kmem_cache for inet_frag_queue
2014-08-02 15:31:31 -07:00
inet_hashtables.c
net: use reciprocal_scale() helper
2014-08-23 12:21:21 -07:00
inet_lro.c
inet_timewait_sock.c
inetpeer.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2014-06-12 14:27:40 -07:00
ip_forward.c
ip_fragment.c
inet: frags: use kmem_cache for inet_frag_queue
2014-08-02 15:31:31 -07:00
ip_gre.c
gre: allow changing mac address when device is up
2014-06-10 22:46:42 -07:00
ip_input.c
ip_options.c
ipv4: fix buffer overflow in ip_options_compile()
2014-07-21 20:16:26 -07:00
ip_output.c
net-timestamp: add key to disambiguate concurrent datagrams
2014-08-05 16:35:54 -07:00
ip_sockglue.c
sock: deduplicate errqueue dequeue
2014-09-01 21:49:08 -07:00
ip_tunnel.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2014-08-05 18:46:26 -07:00
ip_tunnel_core.c
ip_vti.c
vti: Simplify error handling in module init and exit
2014-06-26 08:21:57 +02:00
ipcomp.c
ipconfig.c
ipconfig: Use time_before
2014-08-22 12:23:11 -07:00
ipip.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2014-06-11 16:02:55 -07:00
ipmr.c
net: set name_assign_type in alloc_netdev()
2014-07-15 16:12:48 -07:00
Kconfig
udp: Add udp_sock_create for UDP tunnels to open listener socket
2014-07-14 16:12:15 -07:00
Makefile
udp: Add udp_sock_create for UDP tunnels to open listener socket
2014-07-14 16:12:15 -07:00
netfilter.c
ping.c
net: use inet6_iif instead of IP6CB()->iif
2014-07-31 22:37:06 -07:00
proc.c
inet: frag: don't account number of fragment queues
2014-07-27 22:34:36 -07:00
protocol.c
raw.c
ipv4: Make IP_MULTICAST_ALL and IP_MSFILTER work on raw sockets
2014-07-23 15:13:26 -07:00
route.c
ipv4: removed redundant conditional
2014-08-08 10:22:22 -07:00
syncookies.c
tcp: syncookies: mark cookie_secret read_mostly
2014-08-27 16:30:49 -07:00
sysctl_net_ipv4.c
tcp.c
tcp: don't use timestamp from repaired skb-s to calculate RTT (v2)
2014-08-14 14:38:54 -07:00
tcp_bic.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_cong.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_cubic.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_diag.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_fastopen.c
tcp: remove unnecessary tcp_sk assignment.
2014-06-16 21:35:00 -07:00
tcp_highspeed.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_htcp.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_hybla.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_illinois.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_input.c
tcp: improve undo on timeout
2014-08-22 21:28:02 -07:00
tcp_ipv4.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_lp.c
tcp_memcontrol.c
cgroup: replace cgroup_add_cftypes() with cgroup_add_legacy_cftypes()
2014-07-15 11:05:09 -04:00
tcp_metrics.c
tcp: don't allow syn packets without timestamps to pass tcp_tw_recycle logic
2014-08-14 14:38:54 -07:00
tcp_minisocks.c
inet: move ipv6only in sock_common
2014-07-01 23:46:21 -07:00
tcp_offload.c
tcp: Call skb_gro_checksum_validate
2014-08-24 18:09:24 -07:00
tcp_output.c
tcp: fix tcp_release_cb() to dispatch via address family for mtu_reduced()
2014-08-14 14:38:54 -07:00
tcp_probe.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_scalable.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_timer.c
tcp: reduce spurious retransmits due to transient SACK reneging
2014-08-05 16:29:33 -07:00
tcp_vegas.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_vegas.h
tcp_veno.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_westwood.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tcp_yeah.c
tcp: whitespace fixes
2014-09-01 18:12:45 -07:00
tunnel4.c
udp.c
udp: Add support for doing checksum unnecessary conversion
2014-09-01 21:36:28 -07:00
udp_diag.c
udp_impl.h
udp_offload.c
udp: Add support for doing checksum unnecessary conversion
2014-09-01 21:36:28 -07:00
udp_tunnel.c
udp: Add udp_sock_create for UDP tunnels to open listener socket
2014-07-14 16:12:15 -07:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4: Remove duplicate semicolon
2014-06-30 07:49:47 +02:00
xfrm4_state.c
xfrm4_tunnel.c