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] [day] [month] [year] [list]
Date:	Tue, 18 Aug 2015 07:25:16 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Laight <David.Laight@...LAB.COM>
Cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

On Tue, 2015-08-18 at 13:57 +0000, David Laight wrote:
> s the purpose of del_timer_sync()
> 
> I wasn't worried about del_timer_sync().
> The problem is the call to timer_pending().
> 
> If the timer has just expired, and the timeout function is running
> (on another cpu) then timer_pending() will return false.

This case is not a problem. refcount will be properly handled. No leak,
no reuse, no crash.


> So any tidyup path (apart from that called by the timeout function itself)
> will fail to wait for the function to finish.
> 
> So, in effect, you've converted the code back into a call to del_timer().

This is fine.

> 
> timer_pending() should probably never be called without the relevant
> timer lock help - because the result is stale.

Thats absolutely not true. Please read again timer code and linux code,
you'll see lot of timer uses without a lock being held (unserialized use
of timers)

This is why we have mod_timer_pending() for example.


--
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