]> git.baikalelectronics.ru Git - kernel.git/commit
net: nfc: nci: Change the NCI close sequence
authorBongsu Jeon <bongsu.jeon@samsung.com>
Thu, 31 Dec 2020 02:59:26 +0000 (11:59 +0900)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2021 00:06:34 +0000 (16:06 -0800)
commitfda3bd488314f97ee7e3dd14b40643a7c77afc22
tree095d62371421093dbe2257e8fbee2f519c326f3a
parentfe203d538f516c296bba73b266f43c2855a15132
net: nfc: nci: Change the NCI close sequence

If there is a NCI command in work queue after closing the NCI device at
nci_unregister_device, The NCI command timer starts at flush_workqueue
function and then NCI command timeout handler would be called 5 second
after flushing the NCI command work queue and destroying the queue.
At that time, the timeout handler would try to use NCI command work queue
that is destroyed already. it will causes the problem. To avoid this
abnormal situation, change the sequence to prevent the NCI command timeout
handler from being called after destroying the NCI command work queue.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/nfc/nci/core.c