Article View: linux.kernel.netdev
Article #26807Re: [PATCH] eea: do not credit TX completions without a matching descriptor
From: guohongyu
Date: Fri, 04 Dec 2026 07:13
Date: Fri, 04 Dec 2026 07:13
27 lines
9794 bytes
9794 bytes
Hi, Answers to the questions: The issue was found by manual code inspection of the eea driver (commit aef5055e9764, new in v7.2). I was auditing the TX completion path against the RX path and noticed the asymmetry: eea_rx_desc_to_ctx() verifies the meta state (ctx->meta->in_use) before accepting a completion, while eea_clean_tx() acks every completion it reads, including one whose id has no in-flight descriptor. The issue was not triggered at runtime. It needs a device to emit a TX completion that maps to no in-flight descriptor (bogus or replayed completion), which I have no way to produce. The impact statement in the commit message follows from reading the code: the phantom credit grows num_free past the free descriptors, the queue never stops, and the next eea_tx_meta_get() returns NULL, which __eea_tx_desc_fill() dereferences. The change was not tested on real hardware. I have no EEA adapter. The code compiles and there is no behavior change on the happy path where every completion maps to an in-flight descriptor. Testing on real EEA hardware would be appreciated. Best regards, Hongyu Guo
Technical Details
Message-ID:
<20261204071314.345908-1-guohongyu@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377148-linux-kernel-netdev=dewy.ruReferences:
<20261204062855.344139-1-guohongyu@cmss.chinamobile.com> <179636657003.3305.15898421567218826693@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377148-linux-kernel-netdev=dewy.ru From: guohongyu@cmss.chinamobile.com (guohongyu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] eea: do not credit TX completions without a matching descriptor Date: Fri, 4 Dec 2026 15:13:14 +0800 Organization: Usenet Network Message-ID: <20261204071314.345908-1-guohongyu@cmss.chinamobile.com> References: <20261204062855.344139-1-guohongyu@cmss.chinamobile.com> <179636657003.3305.15898421567218826693@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2701745"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0ZlvK71ovDBIYP5GNZk3fjF8j3U= sha256:p70OUOJeb4GdelGhCfyFjcOd20EVZJPpetlblhWuvLY= sha1:5fS7AtgpzO01AqbuxJVSFCxmpnU= sha256:s+Se47qLLzmUei9boYmC3XbqExlsjOEfjvijWznITKc= 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 E0D86117B52; Fri, 4 Dec 2026 10:21:17 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.099 X-Spam-Status: No, score=-3.099 tagged_above=-9999 required=6.31 tests=[DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-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 srUqrz5on2Dc; Fri, 4 Dec 2026 10:21:07 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377148-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 4F4F3117B36; Fri, 4 Dec 2026 10:20:49 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 3515324802; Fri, 4 Dec 2026 07:20:48 +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=1796368846; b=WX+QdQqwDT15K7iey/K5p4NTUv7lZcPVr1amWiuGN5p8/NS7imK102wxtGzblPpn3C2R xWD/HJYX5+ceqD5xh2dNwaO77f1N6xRpw7biNQwJ3SmKvG/i4oeIi0DeVVqW3/l4jQY/2 5JACpCnkEDkx1vxcB2iIU1WrLi7GuKBsrnClh7WfZq9g13HdBkXqsA1BxjIHC/FfcH1za 3akJbd9JC+jvTJHaqFj3gU6bE7WexE0Z2nptsTFssFcUuO6yHOG/LjTdnsR2ZwXMTlYS4 WSBjdgPLmEZFNvbViyCgdWTDrbuJ4dByyuanKUADvhynWbTXqCbRWo934kdGz5vEnqw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796368846; 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=ZTeh9UOgS/LZCxrn3Fm4Ye6PvvoNrwl8we5qDn+iY6s=; b=yP3ll0z3CpkbmvFyeur7wOvxggTbCWzTzR593Z9Ww6j5UTuwi66mniSC3HI53qGLp2xn pGmViy0lMDTLEnkCQPfcx7Wj7zW/NTYnILTuFGjRVhVL8BEtNhxZufeHdpCHuwzA1mpzn 9zbJg31SBTLzgw0gNBUxyccIAIin53PbAXIZPGfH29AdLlAFBrja1oBQk6Y5zoAcw9lmr Dd47fzt9lEO+YyG1VimCHlmgFFG7XCz7iRsq639ypmnjRMYPd3rOre2wJ4gfojTdIK2u+ fN4yaEag+VwM417vki2Unmfg3TmVWplABbqVMH0hevGrxMfKFrwK7Mmq6+8X73zeSXQ== 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=zoredARt; 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 E0BB0606A334; Fri, 4 Dec 2026 07:20:45 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=zoredARt X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796368845; b=W+2fYycJpFb8dxzE17dLFp8O/fCrPS1rMZoAFmatR5HN2OWoql+RWnVSsXhXnQrf9Fw3 ms1pvM7z33vrb5AOo8MriDGal9PdAeiFWJCI8nAaLo+/bwRQ4FhCNLiDH3Nez8JUp9/lG bR/jazugN3ZD9L0ERM/3gEoaDf2YJFbfmTQ57vZooax99mmn6wpWg70YAdxZstbDzGd7j 5SaHq+8azcxGgixW0Of2Wr/0d3qZhJUby21VA3XILyPOwri6zI99OgSb0MSINKRcC1j3s bMSpXN6jOCMiv53iiISx+QvoT/N60B5id8+T/ckiePX1GMAJxUn8v+TEk3eIojnwpMQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796368845; 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=ZTeh9UOgS/LZCxrn3Fm4Ye6PvvoNrwl8we5qDn+iY6s=; b=Ptg6XNJgFaedTx0HIgq7Uf+4iDXowpF/SNuqihDvmJc1QSOMAHuoQDtYnRn5fZSrvCG8 bEAIUirPZq6tw1r3VSY2aCEBnrqaadBzMIU1SfYLkYhnH9rIctP/rYeCk1jW2/F604apr vMv7Mq87dr71/Ti0cmXBDpKnhlYY23YAWBbck7WjlSh11EJA++VpD1PoL5XD496XrHST0 suB/IebSy3uPy1/InoJLTZrLr6HzormPVR59xYU6vOh/dPs6ks5qFC4aGtvffe9dS7WlI rbPCSJF+xMpaWP5VyQ6uR/Jw1eCVpc59qOGPxQUZIR1a7jWdXFfdBTvtuk5zlws+ykg== 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=zoredARt; arc=none smtp.remote-ip=111.22.67.139 X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 874DF606A322 for <netdev@vger.kernel.org>; Fri, 4 Dec 2026 07:20:41 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 874DF606A322 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=zoredARtYIAUkWxFBQUEK/vJDkI2+AcCGk0LwUhIzdhAK/8nv5zMdSRx9ggaB+XVUv8hxirYYlaRD pBGB2CRZ+MEHa+TD2eLVCyk5LcZt5h6Z+YG+9dOIVLNWmX7LjVuRI61Ps1ThsSgku6CIq+KxvkNB8R WrdDrOkeWJ+Z1w+w= 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-app09-12009 (RichMail) with SMTP id 2ee96b1269c2faa-a8289; Fri, 04 Dec 2026 15:20:34 +0800 (CST) X-RM-TRANSID: 2ee96b1269c2faa-a8289 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from localhost.localdomain (unknown[223.112.32.189]) by rmsmtp-syy-appsvr09-12009 (RichMail) with SMTP id 2ee96b1269c28f8-8eb9a; Fri, 04 Dec 2026 15:20:34 +0800 (CST) X-RM-TRANSID: 2ee96b1269c28f8-8eb9a X-Cc: netdev@vger.kernel.org, Xuan Zhuo <xuanzhuo@linux.alibaba.com>, Wen Gu <guwen@linux.alibaba.com>, Philo Lu <lulie@linux.alibaba.com>, 13057616121@163.com X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <179636657003.3305.15898421567218826693@kernel.org> 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