diff options
| author | 2009-01-20 10:57:48 +0000 | |
|---|---|---|
| committer | 2009-01-21 16:00:43 -0800 | |
| commit | a7385ba21102a90f902055f9f185ca02bf62fa43 (patch) | |
| tree | 93aa0f83a70f704e33ed378b2ad4636533bd7bde /include | |
| parent | tun: Remove unnecessary tun_get_by_name (diff) | |
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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
