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:	Tue, 18 Aug 2015 11:04:05 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Eric Dumazet' <eric.dumazet@...il.com>,
	David Miller <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

From: Eric Dumazet
> Sent: 13 August 2015 23:45
> When replacing del_timer() with del_timer_sync(), I introduced
> a deadlock condition :
> 
> reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop()
> 
> inet_csk_reqsk_queue_drop() can be called from many contexts,
> one being the timer handler itself (reqsk_timer_handler()).
> 
> In this case, del_timer_sync() loops forever.
> 
> Simple fix is to test if timer is pending.

Doesn't that mean you fail to wait for the timer function
to finish if you are calling from a different context?

What you need to know is whether the current context
is that running the timer itself.
In which case you need to mark the timer 'to be deleted'
and actually delete it when the timer function returns.
(so other code can still wait for completion.)

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ