mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
net: sctp: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Vlad Yasevich <vyasevich@gmail.com> Cc: Neil Horman <nhorman@tuxdriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-sctp@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a4cdd9ff1f
commit
9c3b575183
5 changed files with 66 additions and 52 deletions
|
@ -622,9 +622,9 @@ static void sctp_v4_ecn_capable(struct sock *sk)
|
|||
INET_ECN_xmit(sk);
|
||||
}
|
||||
|
||||
static void sctp_addr_wq_timeout_handler(unsigned long arg)
|
||||
static void sctp_addr_wq_timeout_handler(struct timer_list *t)
|
||||
{
|
||||
struct net *net = (struct net *)arg;
|
||||
struct net *net = from_timer(net, t, sctp.addr_wq_timer);
|
||||
struct sctp_sockaddr_entry *addrw, *temp;
|
||||
struct sctp_sock *sp;
|
||||
|
||||
|
@ -1304,8 +1304,7 @@ static int __net_init sctp_defaults_init(struct net *net)
|
|||
INIT_LIST_HEAD(&net->sctp.auto_asconf_splist);
|
||||
spin_lock_init(&net->sctp.addr_wq_lock);
|
||||
net->sctp.addr_wq_timer.expires = 0;
|
||||
setup_timer(&net->sctp.addr_wq_timer, sctp_addr_wq_timeout_handler,
|
||||
(unsigned long)net);
|
||||
timer_setup(&net->sctp.addr_wq_timer, sctp_addr_wq_timeout_handler, 0);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue