Skip to content

Commit

Permalink
compat: restore timerfd settime and gettime compat syscalls
Browse files Browse the repository at this point in the history
Both compat syscalls got lost with 9d94b9e "switch timerfd compat syscalls
to COMPAT_SYSCALL_DEFINE" because of a typo:
COMPAT instead of CONFIG_COMPAT.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
heicarst authored and Al Viro committed Mar 2, 2013
1 parent dfbb83d commit 0e803ba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fs/timerfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct itimerspec __user *, otmr)
return copy_to_user(otmr, &kotmr, sizeof(kotmr)) ? -EFAULT: 0;
}

#ifdef COMPAT
#ifdef CONFIG_COMPAT
COMPAT_SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags,
const struct itimerspec __user *, utmr,
struct itimerspec __user *, otmr)
const struct compat_itimerspec __user *, utmr,
struct compat_itimerspec __user *, otmr)
{
struct itimerspec new, old;
int ret;
Expand All @@ -402,12 +402,12 @@ COMPAT_SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags,
}

COMPAT_SYSCALL_DEFINE2(timerfd_gettime, int, ufd,
struct itimerspec __user *, otmr)
struct compat_itimerspec __user *, otmr)
{
struct itimerspec kotmr;
int ret = do_timerfd_gettime(ufd, &kotmr);
if (ret)
return ret;
return put_compat_itimerspec(otmr, &t) ? -EFAULT: 0;
return put_compat_itimerspec(otmr, &kotmr) ? -EFAULT: 0;
}
#endif

0 comments on commit 0e803ba

Please sign in to comment.