2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00
linux-next/drivers/nfc
OGAWA Hirofumi 2497128133 nfc: Fix hangup of RC-S380* in port100_send_ack()
If port100_send_ack() was called twice or more, it has race to hangup.

  port100_send_ack()          port100_send_ack()
    init_completion()
    [...]
    dev->cmd_cancel = true
                                /* this removes previous from completion */
                                init_completion()
				[...]
                                dev->cmd_cancel = true
                                wait_for_completion()
    /* never be waked up */
    wait_for_completion()

Like above race, this code is not assuming port100_send_ack() is
called twice or more.

To fix, this checks dev->cmd_cancel to know if prior cancel is
in-flight or not. And never be remove prior task from completion by
using reinit_completion(), so this guarantees to be waked up properly
soon or later.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-04-01 23:04:30 +02:00
..
fdp NFC: fdp: Detect errors from fdp_nci_create_conn() 2016-07-04 12:17:56 +02:00
microread nfc: mei: use module_mei_cl_driver macro 2016-10-28 08:21:21 -04:00
nfcmrvl NFC: nfcmrvl: avoid being stuck on FW dnld timeout 2015-11-05 00:32:25 +01:00
nxp-nci nfc: Drop owner assignment from i2c_driver 2016-05-01 23:38:14 +02:00
pn533 scripts/spelling.txt: add "omited" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
pn544 nfc: mei: use module_mei_cl_driver macro 2016-10-28 08:21:21 -04:00
s3fwrn5 nfc: s3fwrn5: Use shash 2016-01-27 20:36:09 +08:00
st21nfca nfc: st21nfca: Remove duplicated ST21NFCA_ESE_HOST_ID from se.c 2016-05-04 01:40:28 +02:00
st95hf NFC: st95hf: Fix build error 2015-12-29 19:06:12 +01:00
st-nci nfc: st-nci: Move loopback usage from HCI to NCI 2016-05-04 01:51:42 +02:00
Kconfig NFC: nfcsim: Fix missing dependency on NFC_DIGITAL 2016-07-06 10:02:09 +02:00
Makefile NFC: pn533: Separate physical layer from the core implementation 2016-04-09 23:53:15 +02:00
mei_phy.c mei: bus: split RX and async notification callbacks 2016-11-17 16:37:49 +01:00
mei_phy.h mei: bus: complete variable rename of type struct mei_cl_device 2015-09-20 19:31:09 -07:00
nfcsim.c NFC: nfcsim: Simulate lost frames through debugfs entry 2016-07-19 23:24:49 +02:00
nfcwilink.c drivers: misc: ti-st: Use int instead of fuzzy char for callback status 2016-07-17 19:59:26 +02:00
port100.c nfc: Fix hangup of RC-S380* in port100_send_ack() 2017-04-01 23:04:30 +02:00
trf7970a.c NFC: trf7970a: add TI recommended write of zero to Register 0x18 2016-07-04 12:20:21 +02:00