From: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
To: Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Alexander Shishkin
<virtuoso-0lOfPCoBze7YtjvyW6yDsg@public.gmane.org>,
Alexander Viro
<viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>,
Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Michael Tokarev <mjt-XAri/EZa3C4vJsYlp49lxw@public.gmane.org>,
Marcelo Tosatti
<mtosatti-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
John Stultz <johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
Chris Friesen
<chris.friesen-b7o/lNNmKxtBDgjK7y7TUQ@public.gmane.org>,
Kay Sievers <kay.sievers-tD+1rO4QERM@public.gmane.org>,
"Kirill A. Shutemov"
<kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>,
Artem Bityutskiy
<dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Davide Libenzi <davidel-AhlLAIvw+VEjIGhXcJzhZg@public.gmane.org>,
Michael Kerrisk
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: timerfd-add-tfd_notify_clock_set-to-watch-for-clock-changes.patch added to -mm tree
Date: Fri, 11 Mar 2011 17:23:36 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1103111722521.2787@localhost6.localdomain6> (raw)
In-Reply-To: <20110311135023.GA23552-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Fri, 11 Mar 2011, Oleg Nesterov wrote:
> > @@ -218,10 +266,12 @@ SYSCALL_DEFINE4(timerfd_settime, int, uf
> > * it to the new values.
> > */
> > for (;;) {
> > + spin_lock(¬ifiers_lock);
> > spin_lock_irq(&ctx->wqh.lock);
> > - if (hrtimer_try_to_cancel(&ctx->tmr) >= 0)
> > + if (!list_empty(¬ifiers_list) || hrtimer_try_to_cancel(&ctx->tmr) >= 0)
> > break;
>
> Confused. Why do we check the global notifiers_list?
>
> IOW. Suppose that this list is not empty and timerfd_settime() is called
> without TFD_NOTIFY_CLOCK_SET. Now we are going to reprogramm the timer
> without stopping it?
>
> And. What if timerfd_settime(TFD_NOTIFY_CLOCK_SET, utmr => NULL) is called
> twice? timerfd_setup() blindly does list_add(), and we corrupt the list, no?
And why is this hack in -mm at all ?
Thanks,
tglx
prev parent reply other threads:[~2011-03-11 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 13:50 timerfd-add-tfd_notify_clock_set-to-watch-for-clock-changes.patch added to -mm tree Oleg Nesterov
[not found] ` <20110311135023.GA23552-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-03-11 15:08 ` Alexander Shishkin
2011-03-11 16:23 ` 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.1103111722521.2787@localhost6.localdomain6 \
--to=tglx-hfztesqfncyowbw4kg4ksq@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=chris.friesen-b7o/lNNmKxtBDgjK7y7TUQ@public.gmane.org \
--cc=davidel-AhlLAIvw+VEjIGhXcJzhZg@public.gmane.org \
--cc=dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=gregkh-l3A5Bk7waGM@public.gmane.org \
--cc=johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=kay.sievers-tD+1rO4QERM@public.gmane.org \
--cc=kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mjt-XAri/EZa3C4vJsYlp49lxw@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=mtosatti-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
--cc=virtuoso-0lOfPCoBze7YtjvyW6yDsg@public.gmane.org \
/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