Revision ff1fa2081d173b01cebe2fbf0a2d0f1cee9ce4b5 authored by Jakub Kicinski on 29 June 2022, 18:19:10 UTC, committed by Jakub Kicinski on 30 June 2022, 18:34:10 UTC
Eric reports that syzbot made short work out of my speculative
fix. Indeed when queue gets detached its tfile->tun remains,
so we would try to stop NAPI twice with a detach(), close()
sequence.

Alternative fix would be to move tun_napi_disable() to
tun_detach_all() and let the NAPI run after the queue
has been detached.

Fixes: a8fc8cb5692a ("net: tun: stop NAPI when detaching queues")
Reported-by: syzbot <syzkaller@googlegroups.com>
Reported-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220629181911.372047-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 9c5de24
History
File Mode Size
Kconfig -rw-r--r-- 5.5 KB
LICENCE -rw-r--r-- 1.4 KB
Makefile -rw-r--r-- 786 bytes
README.Locking -rw-r--r-- 6.9 KB
acl.c -rw-r--r-- 6.8 KB
acl.h -rw-r--r-- 1015 bytes
background.c -rw-r--r-- 4.2 KB
build.c -rw-r--r-- 12.6 KB
compr.c -rw-r--r-- 11.6 KB
compr.h -rw-r--r-- 3.1 KB
compr_lzo.c -rw-r--r-- 2.2 KB
compr_rtime.c -rw-r--r-- 2.9 KB
compr_rubin.c -rw-r--r-- 8.7 KB
compr_zlib.c -rw-r--r-- 5.5 KB
debug.c -rw-r--r-- 25.6 KB
debug.h -rw-r--r-- 8.3 KB
dir.c -rw-r--r-- 23.0 KB
erase.c -rw-r--r-- 13.4 KB
file.c -rw-r--r-- 9.4 KB
fs.c -rw-r--r-- 19.4 KB
gc.c -rw-r--r-- 44.0 KB
ioctl.c -rw-r--r-- 557 bytes
jffs2_fs_i.h -rw-r--r-- 1.6 KB
jffs2_fs_sb.h -rw-r--r-- 5.7 KB
malloc.c -rw-r--r-- 7.3 KB
nodelist.c -rw-r--r-- 21.3 KB
nodelist.h -rw-r--r-- 17.9 KB
nodemgmt.c -rw-r--r-- 28.4 KB
os-linux.h -rw-r--r-- 7.4 KB
read.c -rw-r--r-- 6.7 KB
readinode.c -rw-r--r-- 43.2 KB
scan.c -rw-r--r-- 35.3 KB
security.c -rw-r--r-- 2.0 KB
summary.c -rw-r--r-- 23.7 KB
summary.h -rw-r--r-- 6.4 KB
super.c -rw-r--r-- 10.6 KB
symlink.c -rw-r--r-- 417 bytes
wbuf.c -rw-r--r-- 36.9 KB
write.c -rw-r--r-- 21.0 KB
writev.c -rw-r--r-- 1.1 KB
xattr.c -rw-r--r-- 38.3 KB
xattr.h -rw-r--r-- 4.1 KB
xattr_trusted.c -rw-r--r-- 1.2 KB
xattr_user.c -rw-r--r-- 1.1 KB

README.Locking

back to top