mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
Move clear_bit(NCI_DATA_EXCHANGE) before invoking the data exchange
callback in nci_data_exchange_complete().
The callback (e.g. rawsock_data_exchange_complete) may immediately
schedule another data exchange via schedule_work(tx_work). On a
multi-CPU system, tx_work can run and reach nci_transceive() before
the current nci_data_exchange_complete() clears the flag, causing
test_and_set_bit(NCI_DATA_EXCHANGE) to return -EBUSY and the new
transfer to fail.
This causes intermittent flakes in nci/nci_dev in NIPA:
# # RUN NCI.NCI1_0.t4t_tag_read ...
# # t4t_tag_read: Test terminated by timeout
# # FAIL NCI.NCI1_0.t4t_tag_read
# not ok 3 NCI.NCI1_0.t4t_tag_read
Fixes:
|
||
|---|---|---|
| .. | ||
| core.c | ||
| data.c | ||
| hci.c | ||
| Kconfig | ||
| lib.c | ||
| Makefile | ||
| ntf.c | ||
| rsp.c | ||
| spi.c | ||
| uart.c | ||