net: tun: stop NAPI when detaching queues
authorJakub Kicinski <kuba@kernel.org>
Thu, 23 Jun 2022 04:21:05 +0000 (21:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:53:25 +0000 (17:53 +0200)
commit92e4f3ee5831e025a5bcd81782b1d41b27a90c52
tree69c4a4362f880db12fb58aa2ab8998b81089d7f9
parent8145f77d38de4f88b8a69e1463f5c09ba189d77c
net: tun: stop NAPI when detaching queues

commit a8fc8cb5692aebb9c6f7afd4265366d25dcd1d01 upstream.

While looking at a syzbot report I noticed the NAPI only gets
disabled before it's deleted. I think that user can detach
the queue before destroying the device and the NAPI will never
be stopped.

Fixes: 943170998b20 ("tun: enable NAPI for TUN/TAP driver")
Acked-by: Petar Penkov <ppenkov@aviatrix.com>
Link: https://lore.kernel.org/r/20220623042105.2274812-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/tun.c