[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1702021951380.3575@nanos>
Date: Thu, 2 Feb 2017 19:54:48 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Dmitry Vyukov <dvyukov@...gle.com>
cc: Al Viro <viro@...iv.linux.org.uk>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
syzkaller <syzkaller@...glegroups.com>
Subject: Re: [PATCH] timerfd: Protect the might cancel mechanism proper
On Wed, 1 Feb 2017, Dmitry Vyukov wrote:
>
> Can't we still end up with an inconsistently setup timer?
> do_timerfd_settime executes timerfd_setup_cancel and timerfd_setup as
> two separate non-atomic actions. So if there are 2 concurrent
> timerfd_settime calls, one that needs cancel and another that does not
> need cancel, can't we end up with inconsistent setup? E.g. setup timer
> that needs cancel, but it won't be in cancel_list. Or vice versa.
Do we really care? If an application arms the timer with cancel in one
thread and the same timer without cancel in another thread, then it's
probably completely irrelevant whether the state pair timeout/cancel is
correct or not. That's clearly an application bug and I don't want to add
more locking just to make something which is broken by definition pseudo
'atomic'.
Thanks,
tglx
Powered by blists - more mailing lists