Skip to content

Commit

Permalink
net: dns_resolver: convert time_t to time64_t
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Aya Mahfouz authored and davem330 committed Nov 18, 2015
1 parent 206b495 commit 451c2b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/dns_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion net/dns_resolver/dns_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 451c2b5

Please sign in to comment.