]> git.baikalelectronics.ru Git - kernel.git/commit
timerfd: add flags check
authorDavide Libenzi <davidel@xmailserver.org>
Wed, 18 Feb 2009 22:48:18 +0000 (14:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Feb 2009 23:37:53 +0000 (15:37 -0800)
commit3c87c2bafde1cd658ba6a4a816a9552798452636
tree97faea373227afc42c4a8f932fb2fe3fd393a258
parent0c34105b1fbb0631650bac4f1d621dec9f8d6f67
timerfd: add flags check

As requested by Michael, add a missing check for valid flags in
timerfd_settime(), and make it return EINVAL in case some extra bits are
set.

Michael said:
If this is to be any use to userland apps that want to check flag
support (perhaps it is too late already), then the sooner we get it
into the kernel the better: 2.6.29 would be good; earlier stables as
well would be even better.

[akpm@linux-foundation.org: remove unused TFD_FLAGS_SET]
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: <stable@kernel.org> [2.6.27.x, 2.6.28.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/timerfd.c
include/linux/timerfd.h