Skip to content

some fixes of tuntap

Jason Wang lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 1 replyIn review

Changes in v2 from the cover letter

- don't use rcu to dereference tfile->detached as it was already protected by rtnl lock.
- add a patch of switching to use rtnl_dereference().

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tuntap: switch to use rtnl_dereference()drivers/net/tun.c+10 -170 replies
2/3tuntap: forbid calling TUNSETIFF when detacheddrivers/net/tun.c+3 -20 replies
3/3tuntap: fix leaking reference countdrivers/net/tun.c+9 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/3] some fixes of tuntap

Hi all:

There series fixes two issues:
- Don't allow calling TUNSETIFF when a file is detached which may cause kernel data structure corrupt.
- Fix the reference count leaking of sock and module.

Plus a suggestion from Eric to use rtnl_dereference() instead of the open code.

Changes from v1:
- don't use rcu to dereference tfile->detached as it was already protected by rtnl lock.
- add a patch of switching to use rtnl_dereference().

Jason Wang (3):
tuntap: switch to use rtnl_dereference()
tuntap: forbid calling TUNSETIFF when detached
tuntap: fix leaking reference count

 drivers/net/tun.c |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 deletions(-)