Message ID | 1363999108.4431.81.camel@edumazet-glaptop |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Fri, 22 Mar 2013 17:38:28 -0700 > From: Eric Dumazet <edumazet@google.com> > > The WARN_ON(in_interrupt()) in net_enable_timestamp() can get false > positive, in socket clone path, run from softirq context : ... > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/dev.c b/net/core/dev.c index d540ced..b13e5c7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1545,7 +1545,6 @@ void net_enable_timestamp(void) return; } #endif - WARN_ON(in_interrupt()); static_key_slow_inc(&netstamp_needed); } EXPORT_SYMBOL(net_enable_timestamp);