Hi,
Here is the discovery and reproduction summary for this series:
- Patch 1/2 ("nfc: rawsock: serialize SEND_SHUTDOWN and write queue
teardown"):
* Discovery: static analysis and AI-assisted code review.
* Reproduction: the race window between cancel_work_sync() and
rawsock_write_queue_purge() was confirmed via ftrace on an
unmodified kernel; the crash itself was not triggered standalone
without delay injection. Regression-tested in QEMU KVM (KASAN,
LOCKDEP, DEBUG_OBJECTS) with tools/testing/selftests/nci/nci_dev
(8/8 passed) and 600 virtual_ncidev teardown race iterations.
- Patch 2/2 ("nfc: rawsock: avoid synchronous target deactivation in
rawsock_destruct()"):
* Discovery: static analysis and AI-assisted code review.
* Reproduction: triggered live in QEMU KVM on an unmodified kernel
using /dev/virtual_nci without delay injection (an AF_NFC
SOCK_SEQPACKET socket sends one frame and closes concurrently with
the NCI data response), producing the 30-second ndev->rx_wq stall:
nci: __nci_request: wait_for_completion_interruptible_timeout failed 0
Verified fixed in QEMU KVM (KASAN, LOCKDEP, DEBUG_OBJECTS) across
600 virtual_ncidev teardown race iterations (600/600 deactivations,
0 timeouts), 35 targeted deferred/synchronous deactivation invariant
tests, and tools/testing/selftests/nci/nci_dev (8/8 passed).
Best regards,
Bin Luo
Re: [PATCH net v3 0/2] nfc: rawsock: fix teardown races and destruct-time deactivation deadlock
- From
- luob…@gmail.com (bin luo)
- Organization
- Usenet Network
- Message-ID
- <CALa7h7EQzextfmm9=ja0V…@mail.gmail.com>
- Date
- Newsgroups
- linux.kernel.netdev