diff options
author | Dominic Curran <[email protected]> | 2014-01-22 03:03:23 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2014-01-22 21:32:56 -0800 |
commit | fa35864e0bb7f7c13b9c6d6751ddac9b42d4810f (patch) | |
tree | 50f705ece98607b7a54161554b486d65c426ac2e /lib/debugobjects.c | |
parent | bdf4351bbc62f3b24151cf19ca6e531b68d8c340 (diff) |
tuntap: Fix for a race in accessing numqueues
A patch for fixing a race between queue selection and changing queues
was introduced in commit 92bb73ea2("tuntap: fix a possible race between
queue selection and changing queues").
The fix was to prevent the driver from re-reading the tun->numqueues
more than once within tun_select_queue() using ACCESS_ONCE().
We have been experiancing 'Divide-by-zero' errors in tun_net_xmit()
since we moved from 3.6 to 3.10, and believe that they come from a
simular source where the value of tun->numqueues changes to zero
between the first and a subsequent read of tun->numqueues.
The fix is a simular use of ACCESS_ONCE(), as well as a multiply
instead of a divide in the if statement.
Signed-off-by: Dominic Curran <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Maxim Krasnyansky <[email protected]>
Acked-by: Jason Wang <[email protected]>
Acked-by: Max Krasnyansky <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions