summaryrefslogtreecommitdiffstats
path: root/net/compat.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2019-02-02 10:34:46 -0500
committerDavid S. Miller <davem@davemloft.net>2019-02-03 14:17:30 -0500
commit7f1bc6e95d7840d4305595b3e4025cddda88cee5 (patch)
tree9b867e3563ccf7fa168dc4696ca8cbb1ac61fc59 /net/compat.c
parent2edfd8e06145da646cb4ec3e6ed2a68dc8b746bb (diff)
sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD
SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the way they are currently defined, are not y2038 safe. Subsequent patches in the series add new y2038 safe versions of these options which provide 64 bit timestamps on all architectures uniformly. Hence, rename existing options with OLD tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: Willem de Bruijn <willemb@google.com> Cc: deller@gmx.de Cc: dhowells@redhat.com Cc: jejb@parisc-linux.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: linux-afs@lists.infradead.org Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linux-rdma@vger.kernel.org Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/compat.c')
-rw-r--r--net/compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/compat.c b/net/compat.c
index ce8f6e8cdcd2..ccf93cd0e49b 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -219,7 +219,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
219 } 219 }
220 220
221 if (!COMPAT_USE_64BIT_TIME) { 221 if (!COMPAT_USE_64BIT_TIME) {
222 if (level == SOL_SOCKET && type == SCM_TIMESTAMP) { 222 if (level == SOL_SOCKET && type == SO_TIMESTAMP_OLD) {
223 struct timeval *tv = (struct timeval *)data; 223 struct timeval *tv = (struct timeval *)data;
224 ctv.tv_sec = tv->tv_sec; 224 ctv.tv_sec = tv->tv_sec;
225 ctv.tv_usec = tv->tv_usec; 225 ctv.tv_usec = tv->tv_usec;
@@ -227,8 +227,8 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
227 len = sizeof(ctv); 227 len = sizeof(ctv);
228 } 228 }
229 if (level == SOL_SOCKET && 229 if (level == SOL_SOCKET &&
230 (type == SCM_TIMESTAMPNS || type == SCM_TIMESTAMPING)) { 230 (type == SO_TIMESTAMPNS_OLD || type == SO_TIMESTAMPING_OLD)) {
231 int count = type == SCM_TIMESTAMPNS ? 1 : 3; 231 int count = type == SO_TIMESTAMPNS_OLD ? 1 : 3;
232 int i; 232 int i;
233 struct timespec *ts = (struct timespec *)data; 233 struct timespec *ts = (struct timespec *)data;
234 for (i = 0; i < count; i++) { 234 for (i = 0; i < count; i++) {