]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit90c0cc4271170c40d9f960330bee962014115e52
tree69c4a4362f880db12fb58aa2ab8998b81089d7f9
parent31620bd4c1160f8e1a9c8c406382086a1fd7b113
net: tun: stop NAPI when detaching queues

commit 6760cd5a7546da63241f3d9ea7845cbc33d6d300 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: 096abee45e4b ("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