summaryrefslogtreecommitdiffstats
path: root/net/core/sock_diag.c
diff options
context:
space:
mode:
authorJason Wang2013-06-05 10:44:57 +0200
committerDavid S. Miller2013-06-10 23:32:47 +0200
commit92bb73ea2c434618a68a58a2f3a5c3fd0b660d18 (patch)
tree3b310ab023ab438175bd2aa0ccf71814e3760ae9 /net/core/sock_diag.c
parentvhost_net: clear msg.control for non-zerocopy case during tx (diff)
downloadkernel-qcow2-linux-92bb73ea2c434618a68a58a2f3a5c3fd0b660d18.tar.gz
kernel-qcow2-linux-92bb73ea2c434618a68a58a2f3a5c3fd0b660d18.tar.xz
kernel-qcow2-linux-92bb73ea2c434618a68a58a2f3a5c3fd0b660d18.zip
tuntap: fix a possible race between queue selection and changing queues
Complier may generate codes that re-read the tun->numqueues during tun_select_queue(). This may be a race if vlan->numqueues were changed in the same time and can lead unexpected result (e.g. very huge value). We need prevent the compiler from generating such codes by adding an ACCESS_ONCE() to make sure tun->numqueues were only read once. Bug were introduced by commit c8d68e6be1c3b242f1c598595830890b65cea64a (tuntap: multiqueue support). Reported-by: Michael S. Tsirkin <mst@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock_diag.c')
0 files changed, 0 insertions, 0 deletions