linux/net/core
Eric Dumazet 9979a55a83 net: remove a WARN_ON() in net_enable_timestamp()
The WARN_ON(in_interrupt()) in net_enable_timestamp() can get false
positive, in socket clone path, run from softirq context :

[ 3641.624425] WARNING: at net/core/dev.c:1532 net_enable_timestamp+0x7b/0x80()
[ 3641.668811] Call Trace:
[ 3641.671254]  <IRQ>  [<ffffffff80286817>] warn_slowpath_common+0x87/0xc0
[ 3641.677871]  [<ffffffff8028686a>] warn_slowpath_null+0x1a/0x20
[ 3641.683683]  [<ffffffff80742f8b>] net_enable_timestamp+0x7b/0x80
[ 3641.689668]  [<ffffffff80732ce5>] sk_clone_lock+0x425/0x450
[ 3641.695222]  [<ffffffff8078db36>] inet_csk_clone_lock+0x16/0x170
[ 3641.701213]  [<ffffffff807ae449>] tcp_create_openreq_child+0x29/0x820
[ 3641.707663]  [<ffffffff807d62e2>] ? ipt_do_table+0x222/0x670
[ 3641.713354]  [<ffffffff807aaf5b>] tcp_v4_syn_recv_sock+0xab/0x3d0
[ 3641.719425]  [<ffffffff807af63a>] tcp_check_req+0x3da/0x530
[ 3641.724979]  [<ffffffff8078b400>] ? inet_hashinfo_init+0x60/0x80
[ 3641.730964]  [<ffffffff807ade6f>] ? tcp_v4_rcv+0x79f/0xbe0
[ 3641.736430]  [<ffffffff807ab9bd>] tcp_v4_do_rcv+0x38d/0x4f0
[ 3641.741985]  [<ffffffff807ae14a>] tcp_v4_rcv+0xa7a/0xbe0

Its safe at this point because the parent socket owns a reference
on the netstamp_needed, so we cant have a 0 -> 1 transition, which
requires to lock a mutex.

Instead of refining the check, lets remove it, as all known callers
are safe. If it ever changes in the future, static_key_slow_inc()
will complain anyway.

Reported-by: Laurent Chavey <chavey@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-24 17:27:27 -04:00
..
datagram.c net: fix infinite loop in __skb_recv_datagram() 2013-02-12 16:07:19 -05:00
dev_addr_lists.c net: move procfs code to net/core/net-procfs.c 2013-02-19 00:51:10 -05:00
dev_ioctl.c net: move ioctl functions into a separated file 2013-02-18 12:27:32 -05:00
dev.c net: remove a WARN_ON() in net_enable_timestamp() 2013-03-24 17:27:27 -04:00
drop_monitor.c drop_monitor: dont sleep in atomic context 2012-06-04 11:42:01 -04:00
dst.c ipv6: fix race condition regarding dst->expires and dst->from. 2013-02-20 15:11:45 -05:00
ethtool.c v4 GRE: Add TCP segmentation offload for GRE 2013-02-15 15:17:11 -05:00
fib_rules.c net: Enable a userns root rtnl calls that are safe for unprivilged users 2012-11-18 20:33:36 -05:00
filter.c sk-filter: Add ability to lock a socket filter program 2013-01-17 03:21:25 -05:00
flow_dissector.c flow_keys: include thoff into flow_keys for later usage 2013-03-20 12:14:36 -04:00
flow.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
gen_estimator.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
gen_stats.c gen_stats: Stop using NLA_PUT*(). 2012-04-02 04:33:44 -04:00
iovec.c net: get rid of some pointless casts to sockaddr 2012-03-11 19:11:22 -07:00
link_watch.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
Makefile net: move procfs code to net/core/net-procfs.c 2013-02-19 00:51:10 -05:00
neighbour.c net neigh: Optimize neighbor entry size calculation. 2013-01-28 23:17:51 -05:00
net_namespace.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
net-procfs.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
net-sysfs.c net/core: apply pm_runtime_set_memalloc_noio on network devices 2013-02-23 17:50:16 -08:00
net-sysfs.h xps: Add CONFIG_XPS 2010-11-28 18:24:14 -08:00
net-traces.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netevent.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netpoll.c netpoll: fix smatch warnings in netpoll core code 2013-02-13 11:56:46 -05:00
netprio_cgroup.c net: core: Remove unnecessary alloc/OOM messages 2013-02-06 14:58:52 -05:00
pktgen.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
request_sock.c tcp: fix a panic on UP machines in reqsk_fastopen_remove 2013-01-14 18:10:05 -05:00
rtnetlink.c rtnetlink: Mask the rta_type when range checking 2013-03-17 11:43:40 -04:00
scm.c net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly 2013-01-22 14:17:38 -05:00
secure_seq.c netfilter: ipv6: add IPv6 NAT support 2012-08-30 03:00:17 +02:00
skbuff.c net: fix a wrong assignment in skb_split() 2013-02-20 15:11:44 -05:00
sock_diag.c sock_diag: Simplify sock_diag_handlers[] handling in __sock_diag_rcv_msg 2013-02-23 13:51:54 -05:00
sock.c sock: only define socket limit if mem cgroup configured 2013-02-22 15:10:19 -05:00
stream.c net: Fix the condition passed to sk_wait_event() 2010-10-03 20:41:32 -07:00
sysctl_net_core.c net: avoid to hang up on sending due to sysctl configuration overflow. 2013-01-28 23:15:27 -05:00
timestamping.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
user_dma.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
utils.c net: add doc for in4_pton() 2012-10-12 13:56:52 -04:00