remarkable-linux/net
Daniel Borkmann 87a2fd286a packet: don't unconditionally schedule() in case of MSG_DONTWAIT
In tpacket_snd(), when we've discovered a first frame that is
not in status TP_STATUS_SEND_REQUEST, and return a NULL buffer,
we exit the send routine in case of MSG_DONTWAIT, since we've
finished traversing the mmaped send ring buffer and don't care
about pending frames.

While doing so, we still unconditionally call an expensive
schedule() in the packet_current_frame() "error" path, which
is unnecessary in this case since it's enough to just quit
the function.

Also, in case MSG_DONTWAIT is not set, we should rather test
for need_resched() first and do schedule() only if necessary
since meanwhile pending frames could already have finished
processing and called skb destructor.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16 16:17:11 -08:00
..
9p
802 neigh: use NEIGH_VAR_INIT in ndo_neigh_setup functions. 2014-01-16 11:31:58 -08:00
8021q
appletalk
atm
ax25
batman-adv Revert "batman-adv: drop dependency against CRC16" 2014-01-15 16:54:14 -08:00
bluetooth net: move 6lowpan compression code to separate module 2014-01-15 15:36:38 -08:00
bridge bridge: move br_net_exit() to br.c 2014-01-13 23:42:39 -08:00
caif caif: __dev_get_by_index instead of dev_get_by_index to find interface 2014-01-14 18:50:47 -08:00
can can: use __dev_get_by_index instead of dev_get_by_index to find interface 2014-01-14 18:50:47 -08:00
ceph
core net: rename sysfs symlinks on device name change 2014-01-15 15:16:20 -08:00
dcb dcb: use __dev_get_by_name instead of dev_get_by_name to find interface 2014-01-14 18:50:46 -08:00
dccp ipv4: introduce hardened ip_no_pmtu_disc mode 2014-01-13 11:22:55 -08:00
decnet decnet: use __dev_get_by_index instead of dev_get_by_index to find interface 2014-01-14 18:50:46 -08:00
dns_resolver
dsa
ethernet net: eth_type_trans() should use skb_header_pointer() 2014-01-16 15:30:31 -08:00
hsr
ieee802154 net: move 6lowpan compression code to separate module 2014-01-15 15:36:38 -08:00
ipv4 net/ipv4: don't use module_init in non-modular gre_offload 2014-01-16 16:08:27 -08:00
ipv6 ipv6 addrconf: don't cleanup prefix route for IFA_F_NOPREFIXROUTE 2014-01-15 17:00:40 -08:00
ipx
irda
iucv
key
l2tp l2tp: make local functions static 2014-01-13 12:00:16 -08:00
lapb
llc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-14 14:42:42 -08:00
mac802154
mpls
netfilter Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables 2014-01-16 11:44:54 -08:00
netlabel
netlink Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch 2014-01-06 19:48:38 -05:00
netrom
nfc net: Spelling s/transmition/transmission/ 2014-01-14 17:11:26 -08:00
openvswitch net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
packet packet: don't unconditionally schedule() in case of MSG_DONTWAIT 2014-01-16 16:17:11 -08:00
phonet
rds net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
rfkill
rose Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
rxrpc
sched net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
sctp sctp: create helper function to enable|disable sackdelay 2014-01-15 16:47:48 -08:00
sunrpc net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
tipc tipc: spelling fixes 2014-01-14 18:18:22 -08:00
unix
vmw_vsock
wimax
wireless net: nl80211: __dev_get_by_index instead of dev_get_by_index to find interface 2014-01-14 18:50:47 -08:00
x25
xfrm net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
compat.c
Kconfig
Makefile net: move 6lowpan compression code to separate module 2014-01-15 15:36:38 -08:00
nonet.c
socket.c
sysctl_net.c