android_kernel_samsung_univ.../net/nfc
Tetsuo Handa bb68d6a60a net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL.
commit 3bc53be9db21040b5d2de4d455f023c8c494aa68 upstream.

syzbot is reporting stalls at nfc_llcp_send_ui_frame() [1]. This is
because nfc_llcp_send_ui_frame() is retrying the loop without any delay
when nonblocking nfc_alloc_send_skb() returned NULL.

Since there is no need to use MSG_DONTWAIT if we retry until
sock_alloc_send_pskb() succeeds, let's use blocking call.
Also, in case an unexpected error occurred, let's break the loop
if blocking nfc_alloc_send_skb() failed.

[1] https://syzkaller.appspot.com/bug?id=4a131cc571c3733e0eff6bc673f4e36ae48f19c6

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+d29d18215e477cfbfbdd@syzkaller.appspotmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-22 14:25:54 +02:00
..
hci NFC: st21nfca: Add support for proprietary commands 2015-10-27 04:00:24 +01:00
nci NFC: fix broken device allocation 2017-07-27 15:06:03 -07:00
af_nfc.c
core.c NFC: fix device-allocation error return 2017-11-30 08:37:23 +00:00
digital_core.c NFC: netlink: Add mode parameter to deactivate_target functions 2015-10-27 03:55:12 +01:00
digital_dep.c
digital_technology.c
digital.h
Kconfig
llcp_commands.c net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL. 2018-07-22 14:25:54 +02:00
llcp_core.c
llcp_sock.c NFC: Add sockaddr length checks before accessing sa_family in bind handlers 2017-07-27 15:06:03 -07:00
llcp.h
Makefile
netlink.c NFC: llcp: Limit size of SDP URI 2018-05-30 07:48:59 +02:00
nfc.h NFC: netlink: Add mode parameter to deactivate_target functions 2015-10-27 03:55:12 +01:00
rawsock.c NFC: netlink: Add mode parameter to deactivate_target functions 2015-10-27 03:55:12 +01:00