]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nfc: virtual_ncidev: Add variable to check if ndev is running
authorNguyen Dinh Phi <phind.uet@gmail.com>
Tue, 21 Nov 2023 07:53:57 +0000 (15:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Nov 2023 10:55:48 +0000 (10:55 +0000)
commit84d2db91f14a32dc856a5972e3f0907089093c7a
tree04663e475456a7d28f7a5cdc5aa2c590ef1c344d
parentb6fe6f03716da246b453369f98a553d4ab21447c
nfc: virtual_ncidev: Add variable to check if ndev is running

syzbot reported an memory leak that happens when an skb is add to
send_buff after virtual nci closed.
This patch adds a variable to track if the ndev is running before
handling new skb in send function.

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Reported-by: syzbot+6eb09d75211863f15e3e@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/lkml/00000000000075472b06007df4fb@google.com
Reviewed-by: Bongsu Jeon
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/virtual_ncidev.c