Re: [PATCH net] net: prevent sign extension in dev_get_stats()

2017-06-27 Thread David Miller
From: Eric Dumazet Date: Tue, 27 Jun 2017 07:02:20 -0700 > From: Eric Dumazet > > 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

[PATCH net] net: prevent sign extension in dev_get_stats()

2017-06-27 Thread Eric Dumazet
From: Eric Dumazet 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