From: Thomas Gleixner <tglx@linutronix.de>
To: "Nikita V. Youshchenko" <yoush@cs.msu.su>
Cc: LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: When it is save to kfree() hrtimer object?
Date: Mon, 7 Dec 2009 11:35:31 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.0912071127440.3089@localhost.localdomain> (raw)
In-Reply-To: <200912071045.09827@blacky.localdomain>
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
prev parent reply other threads:[~2009-12-07 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 7:45 Nikita V. Youshchenko
2009-12-07 10:35 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0912071127440.3089@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=yoush@cs.msu.su \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®