From: Eric W. Biederman Date: Tue, 20 Jan 2009 10:57:48 +0000 (+0000) Subject: tun: Fix races in tun_set_iff X-Git-Tag: v2.6.30-rc1~662^2~922 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7385ba21102a90f902055f9f185ca02bf62fa43;p=pandora-kernel.git tun: Fix races in tun_set_iff It is possible for two different tasks with access to the same file descriptor to call tun_set_iff on it at the same time and race to attach to a tap device. Prevent this by placing all of the logic to attach to a file descriptor in one function and testing the file descriptor to be certain it is not already attached to another tun device. Signed-off-by: Eric W. Biederman Signed-off-by: David S. Miller --- Reading git-diff-tree failed