]> git.baikalelectronics.ru Git - kernel.git/commit
tun: initialize napi_mutex unconditionally
authorEric Dumazet <edumazet@google.com>
Fri, 28 Sep 2018 21:51:48 +0000 (14:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 06:27:28 +0000 (23:27 -0700)
commit59da855926ce027e0d72e3d348be3bfd55931a1a
tree711dba8be73a7b425c523b09098b57f7f77d330e
parenta2a137b9e0047abe5a7a728ad2bd8cee3c927c3d
tun: initialize napi_mutex unconditionally

This is the first part to fix following syzbot report :

console output: https://syzkaller.appspot.com/x/log.txt?x=145378e6400000
kernel config:  https://syzkaller.appspot.com/x/.config?x=443816db871edd66
link: https://syzkaller.appspot.com/bug?extid=e662df0ac1d753b57e80
Following patch is fixing the race condition, but it seems safer
to initialize this mutex at tfile creation anyway.

Fixes: 12d2dcce0caa ("tun: enable napi_gro_frags() for TUN/TAP driver")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot+e662df0ac1d753b57e80@syzkaller.appspotmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c