lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Feb 2015 13:28:47 +0800
From:	Fan Du <fengyuleidian0615@...il.com>
To:	Ying Xue <ying.xue@...driver.com>
CC:	Fan Du <fan.du@...el.com>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/3] ipv4: Create probe timer for tcp PMTU as
 per RFC4821

于 2015年02月13日 17:59, Ying Xue 写道:
>> +static void icsk_mtup_probe_timer(unsigned long arg)
>> >+{
>> >+	struct sock *sk = (struct sock *)arg;
>> >+	struct net *net = sock_net(sk);
>> >+	struct inet_connection_sock *icsk = inet_csk(sk);
>> >+
>> >+	/* Restore orignal search range */
>> >+	icsk->icsk_mtup.search_high = icsk->icsk_mtup.search_high_sav;
>> >+	icsk->icsk_mtup.search_low = icsk->icsk_mtup.search_low_sav;
>> >+	icsk->icsk_mtup.probe_size = 0;
>> >+}
>> >+
> As icsk_mtup_probe_timer() is run asynchronously, we may touch an invalid socket
> instance if we don't hold socket's refcount before launching the timer.
>
> Therefore, in general we use the standard interfaces like sk_reset_timer() and
> sk_stop_timer() to operate timers associated with socket. So, the usage about
> timer in the patch seems unsafe for us. For instance, you can study how
> icsk_retransmit_timer, icsk_delack_timer and sk_timer, are implemented.

right, socket layer has stander API wrapper to manipulate timers like you point out.
Thanks for the notice :)

> Regards,
> Ying
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ