aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-16 17:29:21 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-18 12:39:55 +0100
commit9f12a77e467b8ec0296cf1c3481447e1b1811f59 (patch)
tree21743d6d55df67754af37afa849e1f56e69cc5c0 /net/core/sock.c
parentinet: frags: Convert timers to use timer_setup() (diff)
downloadlinux-dev-9f12a77e467b8ec0296cf1c3481447e1b1811f59.tar.xz
linux-dev-9f12a77e467b8ec0296cf1c3481447e1b1811f59.zip
net/core: Collapse redundant sk_timer callback data assignments
The core sk_timer initializer can provide the common .data assignment instead of it being set separately in users. Cc: "David S. Miller" <davem@davemloft.net> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Andrew Hendry <andrew.hendry@gmail.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Paolo Abeni <pabeni@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: Colin Ian King <colin.king@canonical.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: linzhang <xiaolou4617@gmail.com> Cc: netdev@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: linux-x25@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/core/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 23953b741a41..f577df17bcf2 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2683,7 +2683,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
sk_init_common(sk);
sk->sk_send_head = NULL;
- init_timer(&sk->sk_timer);
+ setup_timer(&sk->sk_timer, NULL, (unsigned long)sk);
sk->sk_allocation = GFP_KERNEL;
sk->sk_rcvbuf = sysctl_rmem_default;