{"id":2222600,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2222600/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260413073035.4082204-2-aleksandr.loktionov@intel.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/1.1/projects/46/?format=json","name":"Intel Wired Ethernet development","link_name":"intel-wired-lan","list_id":"intel-wired-lan.osuosl.org","list_email":"intel-wired-lan@osuosl.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260413073035.4082204-2-aleksandr.loktionov@intel.com>","date":"2026-04-13T07:30:31","name":"[iwl-net,1/5] iavf: fix null pointer dereference in iavf_detect_recover_hung","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"9e6861b53314eca0c920aca5b1606f04fcc393de","submitter":{"id":75597,"url":"http://patchwork.ozlabs.org/api/1.1/people/75597/?format=json","name":"Loktionov, Aleksandr","email":"aleksandr.loktionov@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260413073035.4082204-2-aleksandr.loktionov@intel.com/mbox/","series":[{"id":499654,"url":"http://patchwork.ozlabs.org/api/1.1/series/499654/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=499654","date":"2026-04-13T07:30:30","name":"iavf: five correctness fixes","version":1,"mbox":"http://patchwork.ozlabs.org/series/499654/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222600/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222600/checks/","tags":{},"headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=ysgiLvQe;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvJws118Pz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 17:30:53 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 29CA961ACC;\n\tMon, 13 Apr 2026 07:30:45 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 7PJ4gcnIg0c2; Mon, 13 Apr 2026 07:30:43 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 1C4916178F;\n\tMon, 13 Apr 2026 07:30:43 +0000 (UTC)","from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists1.osuosl.org (Postfix) with ESMTP id 2D9BD194\n for <intel-wired-lan@lists.osuosl.org>; Mon, 13 Apr 2026 07:30:41 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 1FFC942111\n for <intel-wired-lan@lists.osuosl.org>; Mon, 13 Apr 2026 07:30:41 +0000 (UTC)","from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id OJcGEQAYSECv for <intel-wired-lan@lists.osuosl.org>;\n Mon, 13 Apr 2026 07:30:40 +0000 (UTC)","from mgamail.intel.com (mgamail.intel.com [192.198.163.12])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 411F741F3F\n for <intel-wired-lan@lists.osuosl.org>; Mon, 13 Apr 2026 07:30:40 +0000 (UTC)","from orviesa001.jf.intel.com ([10.64.159.141])\n by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Apr 2026 00:30:39 -0700","from amlin-019-225.igk.intel.com ([10.102.19.225])\n by orviesa001.jf.intel.com with ESMTP; 13 Apr 2026 00:30:38 -0700"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1C4916178F","OpenDKIM Filter v2.11.0 smtp4.osuosl.org 411F741F3F"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776065443;\n\tbh=QNDftkoJLNPlmvgndpdgPF6pw7XMROEVYtmkojndOYg=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=ysgiLvQeU01/AHJW3Dqkh2277lAPj7XEizjZIWjt1pBQThIoH8GEUDmEFfKo9NbwL\n\t /FLqRTxzN/cVcp+AeXPxN2kUdgLDx6a2OK0DmmVhJymYRBVtOq0GRapkmDn+1Sdj6J\n\t Ql5X0MkgSz2wu2ZmSP3XfX7+Ib+sutJcTwvk/24mTlbBgPQOHS7cqU40+13rkXLGxP\n\t aw3BCyG10u6iNQ3k/D6oWsHxiZjGS0JUgS3VhWhVvHH3yI7QUIUmCrexgRgYqb/2Jy\n\t ObYWLPhaMuoxFF6pqdhoG/o7+ci99LaF3UQQ7vCf7MDVqt1X5gumhvYe+QnTvuGMrG\n\t k91Xz2fah/2zg==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.12;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp4.osuosl.org 411F741F3F","X-CSE-ConnectionGUID":["ukLFaMiXQZSoJKfqOv6EnA==","oIM8odAfTtGc4cdJON8cOA=="],"X-CSE-MsgGUID":["aQk4s5NZRvmk0zuD8j2afw==","gWIl8THVTPWKhPqHzA5q+w=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11757\"; a=\"80876624\"","E=Sophos;i=\"6.23,176,1770624000\"; d=\"scan'208\";a=\"80876624\"","E=Sophos;i=\"6.23,176,1770624000\"; d=\"scan'208\";a=\"267700532\""],"X-ExtLoop1":"1","From":"Aleksandr Loktionov <aleksandr.loktionov@intel.com>","To":"intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n aleksandr.loktionov@intel.com","Cc":"netdev@vger.kernel.org,\n\tKiran Patil <kiran.patil@intel.com>","Date":"Mon, 13 Apr 2026 09:30:31 +0200","Message-ID":"<20260413073035.4082204-2-aleksandr.loktionov@intel.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260413073035.4082204-1-aleksandr.loktionov@intel.com>","References":"<20260413073035.4082204-1-aleksandr.loktionov@intel.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1776065440; x=1807601440;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=ta+v/kaw6mxcspfEY59yn1vMg7wbC7MsZRcrKAktIFk=;\n b=efoOBUX+tvXfiAwn6/pc5XCW3xrA+/1Fcg4iftu3fEu3sGcWxXbjTdGa\n k/2r2WSi7etGcZVlC23jriVIFFCSGJNpfsxyPt8JFHy5ezbTcjC7e5SSp\n 4TA+MufF2rseJdTkeF41Cq0jfOJerEs7e+ssmuXbe/w0wxRvpIeLZYfmz\n Z0tnEo7U3hR0RESIeyUaWYF4OFW+vrEOV5n5Lbb9lKC6pZ4xaLwISQP/V\n ZSnNvA0xy22P6KNABoQD0dl0SkwfDTNl39VEASDubJXUH9HUYxB0ILPqP\n skKmnvPpXzUndTYMAg9Rmq7dUWZxP8o7lNMUHKyTcXAaIGkm9cBz1cKq4\n A==;","X-Mailman-Original-Authentication-Results":["smtp4.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com","smtp4.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=efoOBUX+"],"Subject":"[Intel-wired-lan] [PATCH iwl-net 1/5] iavf: fix null pointer\n dereference in iavf_detect_recover_hung","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"From: Kiran Patil <kiran.patil@intel.com>\n\nDuring a concurrent reset, q_vectors are freed and re-allocated while\nthe watchdog task may still be iterating rings in\niavf_detect_recover_hung(). Dereferencing a NULL q_vector inside\niavf_force_wb() results in a crash. Guard against this by skipping\nrings whose q_vector is NULL.\n\nAlso move the tx_ring declaration into the loop body and drop the\nredundant outer NULL initialisation, which the compiler can never\nobserve since an array-element address is always non-NULL.\n\nFixes: 9c6c12595b73 (\"i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout\")\nSigned-off-by: Kiran Patil <kiran.patil@intel.com>\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\n drivers/net/ethernet/intel/iavf/iavf_txrx.c | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c\nindex 363c42b..e7e7fc9 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c\n+++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c\n@@ -176,7 +176,6 @@ static void iavf_force_wb(struct iavf_vsi *vsi, struct iavf_q_vector *q_vector)\n  **/\n void iavf_detect_recover_hung(struct iavf_vsi *vsi)\n {\n-\tstruct iavf_ring *tx_ring = NULL;\n \tstruct net_device *netdev;\n \tunsigned int i;\n \tint packets;\n@@ -195,8 +194,11 @@ void iavf_detect_recover_hung(struct iavf_vsi *vsi)\n \t\treturn;\n \n \tfor (i = 0; i < vsi->back->num_active_queues; i++) {\n-\t\ttx_ring = &vsi->back->tx_rings[i];\n-\t\tif (tx_ring && tx_ring->desc) {\n+\t\tstruct iavf_ring *tx_ring = &vsi->back->tx_rings[i];\n+\n+\t\tif (!tx_ring || !tx_ring->q_vector)\n+\t\t\tcontinue;\n+\t\tif (tx_ring->desc) {\n \t\t\t/* If packet counter has not changed the queue is\n \t\t\t * likely stalled, so force an interrupt for this\n \t\t\t * queue.\n","prefixes":["iwl-net","1/5"]}