Commit 6f64ec7
net: prevent sign extension in dev_get_stats()
Similar to the fix provided by Dominik Heidler in commit
9b3dc0a ("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: caf586e ("net: add a core netdev->rx_dropped counter")
Fixes: 015f068 ("net: net: add a core netdev->tx_dropped counter")
Fixes: 6e7333d ("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>1 parent d747a7a commit 6f64ec7
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7783 | 7783 | | |
7784 | 7784 | | |
7785 | 7785 | | |
7786 | | - | |
7787 | | - | |
7788 | | - | |
| 7786 | + | |
| 7787 | + | |
| 7788 | + | |
7789 | 7789 | | |
7790 | 7790 | | |
7791 | 7791 | | |
| |||
0 commit comments