mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
net: prevent sign extension in dev_get_stats()
commit6f64ec7451upstream. Similar to the fix provided by Dominik Heidler in commit9b3dc0a17d("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:caf586e5f2("net: add a core netdev->rx_dropped counter") Fixes:015f0688f5("net: net: add a core netdev->tx_dropped counter") Fixes:6e7333d315("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ef13840028
commit
3f04c32bf4
1 changed files with 3 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue