Article View: linux.kernel.netdev
Article #7763Re: [PATCH] nfc: pn533: add timeout to USB frame send completion wait
From: Zhao Feng
Date: Tue, 27 Oct 2026 07:01
Date: Tue, 27 Oct 2026 07:01
28 lines
9826 bytes
9826 bytes
Thanks for the detailed review. All three issues are legitimate, and I'm respinning as v2. [High] Confirmed against the code: pn533_wq_cmd() drops a queued command on send failure without calling complete_cb, without clearing cmd_pending and without rescheduling cmd_work, so a pn533_send_cmd_sync() caller would indeed sleep forever and the queue freezes. v2 patch 1/2 now completes the failed command with the error and reschedules cmd_work, so the queue drains with errors instead of freezing. [Medium] v2 patch 2/2 mirrors usb_start_wait_urb(): after usb_kill_urb() it checks urb->status and proceeds normally if the transfer completed between the timeout expiring and the kill, instead of reporting a spurious -ETIMEDOUT. Regarding a protocol-level ACK abort on timeout: pn533_usb_send_ack() is a no-op on ACR122U, and after a genuine stall we cannot know how much of the frame the device consumed, so I kept the timeout path minimal. The stale-response desync you describe remains possible after a real timeout; a full device reset looks too invasive for this fix, but I'm happy to revisit it if the maintainers prefer. [Low] Fixes tag added with the commit you identified, and Cc: stable on both patches. pw-bot: cr
Technical Details
Message-ID:
<20261027070113.1177-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-352250-linux-kernel-netdev=dewy.ruReferences:
<20261023025602.1746-1-zhaofeng2@cmss.chinamobile.com>Show 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-352250-linux-kernel-netdev=dewy.ru From: zhaofeng2@cmss.chinamobile.com (Zhao Feng) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] nfc: pn533: add timeout to USB frame send completion wait Date: Tue, 27 Oct 2026 15:01:13 +0800 Organization: Usenet Network Message-ID: <20261027070113.1177-1-zhaofeng2@cmss.chinamobile.com> References: <20261023025602.1746-1-zhaofeng2@cmss.chinamobile.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1482376"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:gX0fCcgn7k3VMgy+FFndV88XoHA= sha256:XyeLxpp3ptDBlY9nE2DFbBSFdQVW4U84BFlgZgez2LY= sha1:3wqPx0qzHNURp+kw+fXliQJWCZA= sha256:hbMz0DwX5aUXJbBpd8wO8x4z8v4/u8toKkVmVy9xkAE= 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 15343125BDC; Tue, 27 Oct 2026 10:07:06 +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 09V0agHwCV1H; Tue, 27 Oct 2026 10:07:03 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352250-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id DFD5F125BDB; Tue, 27 Oct 2026 10:06:53 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 8DF722E0FC; Tue, 27 Oct 2026 07:01:34 +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=1793084494; b=Df+wtaEjn8RkWEJmz0Wyk3YXi3B4xAFuqI4MzbGHTYE3pfh2QheDHwuBt7bO4fwtj508 mKCP51wTeHmKgS8zuGpt0CdNKJ8HU/7WxV/UpreXEMXuA4xXTERI8IUCdkazwLKDzN0SH 94L9siaAvr8a2uzCey7DydtmVYjC6p2oXWEHh4grnrMTSeUvmrW7gD2baiAXBDnyjIRlt XskxI7He/Lcki0XumoJNrOBjvZOhnGeQc3+WsgOxyGTf8OxOHaE7D0Fp7dtifcT3VK1GE tz8EgPO08IHDlu1TuL1WkaxNHJivnYdNed4RZeaS0DsFXNmCvB29rlJkLI7BoKw4Q9Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793084494; 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: In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=FoWr44Vn/C7ivItg3DiiaJ3pvEZvJG83mHBFKxHkyjQ=; b=4pmhdco8WKslTc4yxhLFXbFRWVXU2hlJnKKgeKoFdcN/1X8XLR7eeLbV9wPDWes7QytH 1Bo5ga+nSWaBGZn5tVVit+DU7lAfuJTibQnhwOgR7wJ+QTi+SQ7xMtCGYpr5TF21CnOou 4G/ULoos/zFZdOXPZu1+BZBSX2iM1zR2pRVU+l0AwxM9jsIPHe5Bg61TlnGECsSiudI7C 4c3XS4CowQ5jD5oGirEpo/jUcVyk4GJATx9pH5XE7X1O85NuRUyf1d99fZRsIMCHh83Bb IhO1vsMHCZXLiax+k6/qrIEjEiKPvOHvYg+mnzd0GR6owTpmf8+C2d5QAlTvyGe4U0w== 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=IH9quLla; 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 6445F606A31B; Tue, 27 Oct 2026 07:01:34 +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=IH9quLla X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.151 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793084493; b=wKWaoprAL+BneYwAB0I3+ksMUsS6OGqyhV08oscBR8I2uLbT0NeaZXzfcGffJL+bTP3R 0qTJa5RNIRhWvK7p85RXhnLHic81n4dj6/aMYPJLWMQxx9roCDougg2IH/xLn952zg798 Ge1nl72inidnxrdZxwDTj8+i4Q8fnkpRXQjnsY4unLUMDw27XTSo41c940U2bixRsY+pc ccUOih88YdOzL3xOlFFR4mLcuwS/r+B78wiNJP0DSL/bj0ns9l8XQItu/WVYuUL/i8jP8 wCm5Eu1LJ9wmYBJUiJWfFQSamDRqxWXK9j1eOEveuUohi0z+P2vyOT71UaOiTybKrnA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793084493; 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:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=FoWr44Vn/C7ivItg3DiiaJ3pvEZvJG83mHBFKxHkyjQ=; b=UiaH1dGa1iLbKRFezh1AmYqNjvPz61vdE8uERaacdZwygbdCj2jEEToupu15+9uQwp2l sHeevRx1j7RDBETPdoAvNS/Et9feWqNFgFzNmJPSohv4AnMJLKkKdmV8sQsXintzm88Gu BjS0n1eVyBJ50wg7cRPN8YoUUywBKhfj7ZyZoptIkc68pd+JdmwTZX4SxfFUFF2RJgTJA Zn96o9gjidHZaPWs/Q9hnXiOKJCORLaqMKGQfKjI2EIjlNDbGe2V/l6Pfx6BdxL3M6pxa nLyxhVYJTTGh9eiaWRuXoQr+OXqpfM1kmMm/V/ejmje1+tbTX3NB9JXk5+Pq0lz4vcA== 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=IH9quLla; arc=none smtp.remote-ip=111.22.67.151 X-Received: from cmccmta8.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E111606A31E; Tue, 27 Oct 2026 07:01:23 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6E111606A31E 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=IH9quLlaG7z1L1ZNcnqZ6KaKK2w+Ktyy/Y+v3zBL0NxOqTrQeG+vc5v6hmrs0cHPj56QbcuHKL2FY 9u8OvF6fkm5zx2BMxagS1wvqWNy3MQUbnCQ68/CsWgB2c0kIbFxtILNxv86W0rp7gCznxKSc2YUqfs oMziEeWqNiH7kna0= 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-app06-12006 (RichMail) with SMTP id 2ee66ae04c37d9f-21f94; Tue, 27 Oct 2026 15:01:17 +0800 (CST) X-RM-TRANSID: 2ee66ae04c37d9f-21f94 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 2ee66ae04c399bc-d0e12; Tue, 27 Oct 2026 15:01:16 +0800 (CST) X-RM-TRANSID: 2ee66ae04c399bc-d0e12 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-In-Reply-To: <20261023025602.1746-1-zhaofeng2@cmss.chinamobile.com> 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