summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>2015-11-18 08:36:44 +0200
committerDavid S. Miller <davem@davemloft.net>2015-11-18 16:27:46 -0500
commit451c2b5caf37b526ae34a1081b71115e1de2d063 (patch)
treed9c722e92738b27af342cbdf9ddedd740cf7202e
parent206b49500df558dbc15d8836b09f6397ec5ed8bb (diff)
downloadlinux-stable-451c2b5caf37b526ae34a1081b71115e1de2d063.tar.gz
linux-stable-451c2b5caf37b526ae34a1081b71115e1de2d063.tar.bz2
linux-stable-451c2b5caf37b526ae34a1081b71115e1de2d063.zip
net: dns_resolver: convert time_t to time64_t
Changes the definition of the pointer _expiry from time_t to time64_t. This is to handle the Y2038 problem where time_t will overflow in the year 2038. The change is safe because the kernel subsystems that call dns_query pass NULL. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/dns_resolver.h2
-rw-r--r--net/dns_resolver/dns_query.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/dns_resolver.h b/include/linux/dns_resolver.h
index cc92268af89a..6ac3cad9aef1 100644
--- a/include/linux/dns_resolver.h
+++ b/include/linux/dns_resolver.h
@@ -27,7 +27,7 @@
#ifdef __KERNEL__
extern int dns_query(const char *type, const char *name, size_t namelen,
- const char *options, char **_result, time_t *_expiry);
+ const char *options, char **_result, time64_t *_expiry);
#endif /* KERNEL */
diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c
index 4677b6fa6dda..ecc28cff08ab 100644
--- a/net/dns_resolver/dns_query.c
+++ b/net/dns_resolver/dns_query.c
@@ -67,7 +67,7 @@
* Returns the size of the result on success, -ve error code otherwise.
*/
int dns_query(const char *type, const char *name, size_t namelen,
- const char *options, char **_result, time_t *_expiry)
+ const char *options, char **_result, time64_t *_expiry)
{
struct key *rkey;
const struct user_key_payload *upayload;