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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0912071127440.3089@localhost.localdomain>
Date:	Mon, 7 Dec 2009 11:35:31 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"Nikita V. Youshchenko" <yoush@...msu.su>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: When it is save to kfree() hrtimer object?

On Mon, 7 Dec 2009, Nikita V. Youshchenko wrote:
> - Isn't it a bug that timer object is accessed after it's callback was 
> called and returned HRTIMER_NORESTART?

No, it's not. It's deliberately implemented that way.

> - If that is not a bug, then when it is "officially safe" to deallocate 
> struct hrtimer object?

When it's neither enqueued nor running the callback. See the other use
sites.
 
> - Are there any recommendations on how to implement "single-shot" timers 
> like in my case?

Well, you wake up something which waits on completion of that request,
right ? Probably the caller which issued the request. Why don't you
free the request in the waiter context after it got woken up ?

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ