summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-01-11 16:59:33 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-11 19:42:02 -0800
commit7c0c3b1a8a175437991ccc898ed66ec5e4a96208 (patch)
tree504dde46c8ea52d750ebd5e9e55e8c432beb83db /block
parentb8deabd3eebaa96cf8d6e290d67b03f36c7f7a41 (diff)
tuntap: forbid calling TUNSETIFF when detached
Michael points out that even after Stefan's fix the TUNSETIFF is still allowed to create a new tap device. This because we only check tfile->tun but the tfile->detached were introduced. Fix this by failing early in tun_set_iff() if the file is detached. After this fix, there's no need to do the check again in tun_set_iff(), so this patch removes it. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions