diff options
author | Deepa Dinamani <[email protected]> | 2016-03-21 18:21:26 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2016-03-21 22:56:38 -0400 |
commit | 3ba9d300c925d89914d15beff2180064ac7ee6f6 (patch) | |
tree | e1acfc791c9478d8cf517d39b14e6de8e2c9af62 /tools/perf/scripts/python/stackcollapse.py | |
parent | 9b246841f4041f85265dec5f769c017fc36a0d33 (diff) |
net: ipv4: Fix truncated timestamp returned by inet_current_timestamp()
The millisecond timestamps returned by the function is
converted to network byte order by making a call to htons().
htons() only returns __be16 while __be32 is required here.
This was identified by the sparse warning from the buildbot:
net/ipv4/af_inet.c:1405:16: sparse: incorrect type in return
expression (different base types)
net/ipv4/af_inet.c:1405:16: expected restricted __be32
net/ipv4/af_inet.c:1405:16: got restricted __be16 [usertype] <noident>
Change the function to use htonl() to return the correct __be32 type
instead so that the millisecond value doesn't get truncated.
Signed-off-by: Deepa Dinamani <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: James Morris <[email protected]>
Cc: Patrick McHardy <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Fixes: 822c868532ca ("net: ipv4: Convert IP network timestamps to be y2038 safe")
Reported-by: Fengguang Wu <[email protected]> [0-day test robot]
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions