socket: Use old_timeval types for socket timestamps
As part of y2038 solution, all internal uses of struct timeval are replaced by struct __kernel_old_timeval and struct compat_timeval by struct old_timeval32. Make socket timestamps use these new types. This is mainly to be able to verify that the kernel build is y2038 safe when such non y2038 safe types are not supported anymore. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: Willem de Bruijn <willemb@google.com> Cc: isdn@linux-pingi.de Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
bcb3fc3247
commit
13c6ee2a92
@@ -209,8 +209,8 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
|
||||
{
|
||||
struct compat_cmsghdr __user *cm = (struct compat_cmsghdr __user *) kmsg->msg_control;
|
||||
struct compat_cmsghdr cmhdr;
|
||||
struct compat_timeval ctv;
|
||||
struct compat_timespec cts[3];
|
||||
struct old_timeval32 ctv;
|
||||
struct old_timespec32 cts[3];
|
||||
int cmlen;
|
||||
|
||||
if (cm == NULL || kmsg->msg_controllen < sizeof(*cm)) {
|
||||
@@ -220,7 +220,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
|
||||
|
||||
if (!COMPAT_USE_64BIT_TIME) {
|
||||
if (level == SOL_SOCKET && type == SO_TIMESTAMP_OLD) {
|
||||
struct timeval *tv = (struct timeval *)data;
|
||||
struct __kernel_old_timeval *tv = (struct __kernel_old_timeval *)data;
|
||||
ctv.tv_sec = tv->tv_sec;
|
||||
ctv.tv_usec = tv->tv_usec;
|
||||
data = &ctv;
|
||||
|
Reference in New Issue
Block a user