summaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorNathaniel Filardo2008-02-05 12:05:07 +0100
committerDavid S. Miller2008-02-05 12:05:07 +0100
commita26af1e08a3a1e0f88e6f2685ac2313d713a59c9 (patch)
treec4b9cdf04305c094e88e2446ec25f7823d38158e /virt/kvm/kvm_main.c
parenthamradio: fix dmascc section mismatch (diff)
downloadkernel-qcow2-linux-a26af1e08a3a1e0f88e6f2685ac2313d713a59c9.tar.gz
kernel-qcow2-linux-a26af1e08a3a1e0f88e6f2685ac2313d713a59c9.tar.xz
kernel-qcow2-linux-a26af1e08a3a1e0f88e6f2685ac2313d713a59c9.zip
tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
From: "Nathaniel Filardo" <nwfilardo@gmail.com> Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806 The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or IFF_ONE_QUEUE during the lifetime of a tap/tun interface. Note that tun_set_iff contains 541 if (ifr->ifr_flags & IFF_NO_PI) 542 tun->flags |= TUN_NO_PI; 543 544 if (ifr->ifr_flags & IFF_ONE_QUEUE) 545 tun->flags |= TUN_ONE_QUEUE; This is easily fixed by adding else branches which clear these bits. Steps to reproduce: This is easily reproduced by setting an interface persistant using tunctl then attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI flag. The ioctl() will succeed and the ifr.flags word is not modified, but the interface remains in IFF_NO_PI mode (as it was set by tunctl). Acked-by: Maxim Krasnyansky <maxk@qualcomm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'virt/kvm/kvm_main.c')
0 files changed, 0 insertions, 0 deletions