Searched hist:a7385ba21102a90f902055f9f185ca02bf62fa43 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ |
H A D | tun.c | diff a7385ba21102a90f902055f9f185ca02bf62fa43 Tue Jan 20 04:57:48 CST 2009 Eric W. Biederman <ebiederm@xmission.com> 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 <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|