Article View: linux.kernel.netdev
Article #7761[PATCH v2 0/2] nfc: pn533: fix hung task on stalled USB send
From: Zhao Feng
Date: Tue, 27 Oct 2026 07:01
Date: Tue, 27 Oct 2026 07:01
26 lines
9441 bytes
9441 bytes
The out URB wait in pn533_usb_send_frame() is unbounded, so a device that never completes the transfer hangs the task holding the command lock (syzbot report). Simply adding a timeout is not enough, because the error path of pn533_wq_cmd() cannot deal with a send failure: it drops the queued command without completing it, leaving synchronous callers asleep forever and the command queue frozen. Patch 1 fixes that pre-existing error path; patch 2 then adds the actual send timeout, handling the race where the transfer completes right between the timeout expiring and the URB being killed. Issues pointed out by the Sashiko AI review of v1. Link to v1: https://lore.kernel.org/netdev/20261023025602.1746-1-zhaofeng2@cmss.chinamobile.com/ Zhao Feng (2): nfc: pn533: complete failed queued commands and keep queue moving nfc: pn533: add timeout to USB frame send completion wait drivers/nfc/pn533/pn533.c | 8 +++++++- drivers/nfc/pn533/usb.c | 20 ++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) -- 2.39.2
Technical Details
Message-ID:
<20261027070136.1339-1-zhaofeng2@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352253-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352253-linux-kernel-netdev=dewy.ru From: zhaofeng2@cmss.chinamobile.com (Zhao Feng) Newsgroups: linux.kernel.netdev Subject: [PATCH v2 0/2] nfc: pn533: fix hung task on stalled USB send Date: Tue, 27 Oct 2026 15:01:33 +0800 Organization: Usenet Network Message-ID: <20261027070136.1339-1-zhaofeng2@cmss.chinamobile.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1482016"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:SIkoUNTQ8m+6M6nM38X6x2/bXl0= sha256:Qn0BVjlZpVoqAVs4qrd/wJLu2y8UtoaEecfRdF9P6G0= sha1:vUUC0bnoihTWLgYRp2c1zatn2KI= sha256:HaS7qSwoo1MSwawNth2HIKw/wLhYaLBU7MJ5VEWVlY8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 15F08125BDE; Tue, 27 Oct 2026 10:03:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.749 X-Spam-Status: No, score=-2.749 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Firht7gV1uoJ; Tue, 27 Oct 2026 10:03:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-352253-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id EE5BB125BDB; Tue, 27 Oct 2026 10:03:29 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id B72CB259A9; Tue, 27 Oct 2026 07:02:00 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793084516; b=nfCmOKWDwnRDjq6BEDgkaaxrNaTd5MG1J1OpXQkaf48+Db0pB6EPlB80/3ajls71/SdF s+/ZwCSLIDorBFMKTRvx1fptbLVnOSL7yT4BZlao3DLnQHMVDlFCXv/k4uxPq6SpZfHpq anrTKQd6K2e27hBIt8Q8rb85prWLxURMR5CgexOH9K1ir+Wk81RjQilD7UYsLKc//jGQd 69vkuMLHCk3WYVB88T5J/6pMs9jFFcNlCqTowQTdtXTokxGOPsGhqNr0qjZBJ8QPmPCPv 5WccovTQZcX+8VO7O2pUYdVD0JE8ZCECuUzOa+bNI6Myo74GKI9iAsoVjFukhy9mPJg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793084516; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=4/uN1Zp2J/k/3SLIBOCDwzRSoBK60Gc0psw5pmXaNiM=; b=aGRrSGr9T0JFnSgL32qXgKTJBQE5y6fCxHl23fWtvl8vKGYo0s3MJBGyBO89V1RRHScB rfh9UlUtyDhCWWSQtOH5rEoKSu5ot8bDXsBJlxpaDQLEeKgPqUKTr+cGaMvLD1PPWtFVk +3PbjhPkIVvmPDKdS4KuknJHuy9UXhmGgWbL5IqPPjSV+oxUt3v2Ngv6K7UqyXj16WNKv IEIMe5FynXEejRjISg7Z3e0RMGgpXjtA2s6+Hj28gm2VJkRv9pbkaOiTpyk7LVOJDNHQ4 HkGF8r/AXzpJpVEePrv6RzvQ4Eg0YGmkvmHHWFMk+2Aao+A+TkSBgQkwv+LXz8KTZYQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=XSZez1WK; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37413606A322; Tue, 27 Oct 2026 07:01:56 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=XSZez1WK X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.137 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793084510; b=dK0RbAnnzadL5MEy2jPnxFGi4qnZ2AtI90grwdA7yIuT6BmdBfQxHH09EiVYbS4lEY4v Z7oHqO12Z3PXQ46Psu1MziMaOx/1/ZudTVO+X+z8zZusuBxtvw2WyI/8D3Ae8bt6JDO4n dx5uKkEBuyNORhauVhMKJe5SwMadglU742Gp1kCFOlG3xlycSOKRdbN4D/LRK/Emmjyx0 Jufh508+Bsy0i4gqA9DSPtYf7CH5UGmBNbO7kf1V+mfykzsbK0w7CG8kHO86uYC4+g/Bs 0e6nL33SUSMUUUFk6LFvUqnnEONYdDSI0lN1Mq2TMTB1C/e+X+TaiPej4gvCvyr6MFA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793084510; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=4/uN1Zp2J/k/3SLIBOCDwzRSoBK60Gc0psw5pmXaNiM=; b=LxdBYmHyirS3Dr6RWRWlPjYea+pEhaxWCyue4z767uCsDVs1lVl6IIECQrCsp1P+DqgS 3umQTYLP2CAOYkZTRktEf6BJtpjPGRQuuMV7d03VK1y5G479oBZLwzE1AuVxi6dfdp9+c wL499ifToVxHm0HmsJUKc6HgIsVCQ7VblwRCd8HaMXZC9ViDlZMuL65nUFWoXySmgQmOM kHjOfXfBZ7IHqW7loN/OYTUpG3+5kR9oG0jO0TlShAOVzz/Xiw6cGOKxhmlcussfdgOuh D950TvLyrKIZD8CdUe5GR/OBgQViKrfTWAt16pUUWpuox8669ejVgApygwEw881bg/g== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=XSZez1WK; arc=none smtp.remote-ip=111.22.67.137 X-Received: from cmccmta4.chinamobile.com (cmccmta4.chinamobile.com [111.22.67.137]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8931A606A32A; Tue, 27 Oct 2026 07:01:48 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8931A606A32A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=XSZez1WK6xpj/BdbouJwFcPWPQkOxJKlaSkjGZaEpph50eorQGU5+6P6z26yWcVgSZgPldry777ue 5hhBvQnz4SFLNwIY/Shcfl9TzHSX1Lze9wIshL2+BBlP71oZZQbcv4YGFAsmFkLppTi3l2fl10BaHh 8rVEl9LdJua9J5dc= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app08-12008 (RichMail) with SMTP id 2ee86ae04c52739-f4d96; Tue, 27 Oct 2026 15:01:38 +0800 (CST) X-RM-TRANSID: 2ee86ae04c52739-f4d96 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from Z04181456177947 (unknown[10.55.1.71]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee66ae04c509fb-d0e51; Tue, 27 Oct 2026 15:01:38 +0800 (CST) X-RM-TRANSID: 2ee66ae04c509fb-d0e51 X-Cc: krzysztof.kozlowski@linaro.org, linux-kernel@vger.kernel.org, syzbot+1c5368988052dc2d8201@syzkaller.appspotmail.com, Zhao Feng <zhaofeng2@cmss.chinamobile.com> X-Mailer: git-send-email 2.55.0.windows.5 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list