Re: x86, x32: Correct invalid use of user timespec in the kernel
From: Dave Jones
Date: Fri Jan 31 2014 - 12:50:28 EST
On Fri, Jan 31, 2014 at 02:54:53AM +0000, Linux Kernel wrote:
> Commit: 2def2ef2ae5f3990aabdbe8a755911902707d268
>
> ...
>
> - if (get_compat_timespec(&ktspec, timeout))
> + if (compat_get_timespec(&ktspec, timeout))
> return -EFAULT;
>
> datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
> flags | MSG_CMSG_COMPAT, &ktspec);
> - if (datagrams > 0 && put_compat_timespec(&ktspec, timeout))
> + if (datagrams > 0 && compat_put_timespec(&ktspec, timeout))
> datagrams = -EFAULT;
>
Can we rename one of each of those functions ?
It's not really surprising they got mixed up given they look so alike.
It looks like an accident just waiting to happen again.
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/