summaryrefslogtreecommitdiffstats
path: root/tools/perf/design.txt
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-08-06 14:22:44 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-09 21:45:35 -0700
commit876bfd4d0f18cd1f698249870c7e7fb944de1c26 (patch)
tree62959754494fb97f48d7c4f811d913321b046554 /tools/perf/design.txt
parent9555b31e8c29d2000e1e1f569f6f242ebd596e47 (diff)
downloadtalos-obmc-linux-876bfd4d0f18cd1f698249870c7e7fb944de1c26.tar.gz
talos-obmc-linux-876bfd4d0f18cd1f698249870c7e7fb944de1c26.zip
tun: Extend RTNL lock coverage over whole ioctl
As it is, parts of the ioctl runs under the RTNL and parts of it do not. The unlocked section is still protected by the BKL, but there can be subtle races. For example, Eric Biederman and Paul Moore observed that if two threads tried to create two tun devices on the same file descriptor, then unexpected results may occur. As there isn't anything in the ioctl that is expected to sleep indefinitely, we can prevent this from occurring by extending the RTNL lock coverage. This also allows to get rid of the BKL. Finally, I changed tun_get_iff to take a tun device in order to avoid calling tun_put which would dead-lock as it also tries to take the RTNL lock. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/design.txt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud