Skip to content
Commit 8145f77d authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Greg Kroah-Hartman
Browse files

net: tun: unlink NAPI from device on destruction



commit 3b9bc84d upstream.

Syzbot found a race between tun file and device destruction.
NAPIs live in struct tun_file which can get destroyed before
the netdev so we have to del them explicitly. The current
code is missing deleting the NAPI if the queue was detached
first.

Fixes: 94317099 ("tun: enable NAPI for TUN/TAP driver")
Reported-by: default avatar <syzbot+b75c138e9286ac742647@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/r/20220623042039.2274708-1-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e2327ba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment