summaryrefslogtreecommitdiff
path: root/kernel/debug
diff options
context:
space:
mode:
authorSimon Schippers <simon.schippers@tu-dortmund.de>2026-01-13 08:51:38 +0100
committerJakub Kicinski <kuba@kernel.org>2026-01-15 19:40:59 -0800
commitc4efd7a770c54964bf2d8c98b2f4fd10be13dc54 (patch)
tree6f96884efe28075e1e63c60a7d9f9a5a9b9e4c0d /kernel/debug
parent9e995c573b63453a904f3157813dc8cde4a6aba4 (diff)
usbnet: fix crash due to missing BQL accounting after resume
In commit 7ff14c52049e ("usbnet: Add support for Byte Queue Limits (BQL)"), it was missed that usbnet_resume() may enqueue SKBs using __skb_queue_tail() without reporting them to BQL. As a result, the next call to netdev_completed_queue() triggers a BUG_ON() in dql_completed(), since the SKBs queued during resume were never accounted for. This patch fixes the issue by adding a corresponding netdev_sent_queue() call in usbnet_resume() when SKBs are queued after suspend. Because dev->txq.lock is held at this point, no concurrent calls to netdev_sent_queue() from usbnet_start_xmit() can occur. The crash can be reproduced by generating network traffic (e.g. iperf3 -c ... -t 0), suspending the system, and then waking it up (e.g. rtcwake -m mem -s 5). When testing USB2 Android tethering (cdc_ncm), the system crashed within three suspend/resume cycles without this patch. With the patch applied, no crashes were observed after 90 cycles. Testing with an AX88179 USB Ethernet adapter also showed no crashes. Fixes: 7ff14c52049e ("usbnet: Add support for Byte Queue Limits (BQL)") Reported-by: Bard Liao <yung-chuan.liao@linux.intel.com> Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Tested-by: Simon Schippers <simon.schippers@tu-dortmund.de> Signed-off-by: Simon Schippers <simon.schippers@tu-dortmund.de> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260113075139.6735-1-simon.schippers@tu-dortmund.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions