diff options
| author | Eric Dumazet <[email protected]> | 2012-08-08 21:13:53 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2012-08-09 23:17:03 +0000 |
| commit | a399a8053164ec8bcb06fed52be9941a26ecde11 (patch) | |
| tree | c60402a77d08c82630d63e972d32b038919b827f /net/core/dev.c | |
| parent | fib: use __fls() on non null argument (diff) | |
| download | kernel-a399a8053164ec8bcb06fed52be9941a26ecde11.tar.gz kernel-a399a8053164ec8bcb06fed52be9941a26ecde11.zip | |
time: jiffies_delta_to_clock_t() helper to the rescue
Various /proc/net files sometimes report crazy timer values, expressed
in clock_t units.
This happens when an expired timer delta (expires - jiffies) is passed
to jiffies_to_clock_t().
This function has an overflow in :
return div_u64((u64)x * TICK_NSEC, NSEC_PER_SEC / USER_HZ);
commit cbbc719fccdb8cb (time: Change jiffies_to_clock_t() argument type
to unsigned long) only got around the problem.
As we cant output negative values in /proc/net/tcp without breaking
various tools, I suggest adding a jiffies_delta_to_clock_t() wrapper
that caps the negative delta to a 0 value.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Maciej Żenczykowski <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: hank <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/core/dev.c')
0 files changed, 0 insertions, 0 deletions
