diff options
| author | Eric Dumazet <edumazet@google.com> | 2017-06-27 07:02:20 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-11-06 15:27:45 +0100 |
| commit | b48567e79a1a0b36547060710388e9c186120bc7 (patch) | |
| tree | 697971c85bdf65d2403f475ac88c92ac3005ca34 /include/linux/errqueue.h | |
| parent | 7b4569db774021a2aedf8d3379e8625469d24b25 (diff) | |
net: prevent sign extension in dev_get_stats()
commit 6f64ec74515925cced6df4571638b5a099a49aae upstream.
Similar to the fix provided by Dominik Heidler in commit
9b3dc0a17d73 ("l2tp: cast l2tp traffic counter to unsigned")
we need to take care of 32bit kernels in dev_get_stats().
When using atomic_long_read(), we add a 'long' to u64 and
might misinterpret high order bit, unless we cast to unsigned.
Fixes: caf586e5f23ce ("net: add a core netdev->rx_dropped counter")
Fixes: 015f0688f57ca ("net: net: add a core netdev->tx_dropped counter")
Fixes: 6e7333d315a76 ("net: add rx_nohandler stat counter")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions
