Marcelo Ricardo Leitner 01ce63c901 sctp: update the netstamp_needed counter when copying sockets
Dmitry Vyukov reported that SCTP was triggering a WARN on socket destroy
related to disabling sock timestamp.

When SCTP accepts an association or peel one off, it copies sock flags
but forgot to call net_enable_timestamp() if a packet timestamping flag
was copied, leading to extra calls to net_disable_timestamp() whenever
such clones were closed.

The fix is to call net_enable_timestamp() whenever we copy a sock with
that flag on, like tcp does.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-05 22:23:22 -05:00
..
2014-09-18 10:54:36 +02:00
2015-03-04 00:23:23 -05:00
2015-06-28 16:55:44 -07:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2015-10-08 04:27:03 -07:00
2013-11-07 19:28:58 -05:00
2014-09-30 01:02:26 -04:00
2015-09-24 12:25:23 -07:00
2015-11-02 22:47:14 -05:00
2015-12-03 11:32:06 -05:00
2015-09-24 09:34:43 +09:00
2015-10-13 04:55:04 -07:00
2014-01-03 20:56:48 -05:00
2015-10-08 04:27:03 -07:00
2015-10-23 06:26:42 -07:00
2014-06-02 11:00:41 -07:00
2015-03-12 22:58:12 -04:00
2015-10-26 22:24:22 -07:00
2015-10-08 04:27:03 -07:00