From: Jason Wang Date: Fri, 11 Jan 2013 16:59:33 +0000 (+0000) Subject: tuntap: forbid calling TUNSETIFF when detached X-Git-Tag: v3.8-rc4~29^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c0c3b1a8a175437991ccc898ed66ec5e4a96208;p=pandora-kernel.git 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 Cc: Stefan Hajnoczi Signed-off-by: Jason Wang Signed-off-by: David S. Miller --- Reading git-diff-tree failed