From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796052420; b=el90edY62ZC6JxYU0TZ6RLJg4qkclKOoyX4oXHcwfUCr+k9Rueq18++P3sBgNoJSOjdZ B5XCVK4aPLeNU7KrNv4NNVGpeLKzriOY2B2cUVGqX8ItG4VQi+bPtcnwzv1eblorsyMjh sx0cG28//zUt7rBrHNxYL0jT7GaobSz1dyLRJ+OkkAnAF9j2TXzTJAlp8nTS11fNDESYF +7NgsStllnwmiL/ncYl4aJwnSLhHxLwmYnuG4V0cFc83GoOdwl83WkBDuXqVJNX6rtYor Dw1x0hxQHAMnltCmCNVD10lL76Xgv7Ut2FhVPBOu3wTL9mmK3YuzVpRq7cRB3F+x+aw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796052420; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Received:Date:In-Reply-To:Mime-Version: References:Message-ID:Subject:From:To:Cc:Content-Type; bh=luBZx3BfiW/joDN51sp4X0lJKx3O3GRmYjsRqhzLBvQ=; b=kH6UJuHwoDEPjaOrmXPyaTacudX8Ah1DdJhibMq2cquf8KiCWS6cGxh93tPEXIulVk5v +9GxV/bkoMdMtQx3Xww9+LT5qBCUaJ6h9e5A92UEewbXZVCptoFRANpEFmeOH30HeA0Ul uCtnIHM0zW76VKO9bPNfDEc5T4kPtvTCogZdVN4zJLjw3M35PDMP3JjuuA5L8ADsw98kY 40vGxbvUUoaoUIRd8u81inToWzEOpRv1YdG1y4f+5afGqYQmFHtsc+TxVh9mdIn5dUL7w pmud3NX2bIQdHUq6NUd6Ifo928Tn/6shI4rTfmDuj99hWZPR38hYGYeyhFf5yLG2Fow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=mGibBJah; arc=none smtp.remote-ip=209.85.222.200 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9042606A31C for ; Mon, 30 Nov 2026 15:26:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A9042606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=mGibBJah Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93909014c85so129135185a.0 for ; Mon, 30 Nov 2026 07:26:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796052418; x=1796657218; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=luBZx3BfiW/joDN51sp4X0lJKx3O3GRmYjsRqhzLBvQ=; b=mGibBJah8X3aAfuTthqKiiB73xU5NO4OEDTa3CUC+rtQPXgr91jnehqXR0DfGVWUyc oO1RMaWghxwfTVg7elbs+uYDMnm4VeB4TS0EzowdUMnoX5A58pSn26fg1PwoI+HpSdjM GIQM1dw4kXsezj7HVXGgHc0hg8UeA+CRg+qEnQURK+B3enaCAEVbtndLUmkqH89uN0Cq 44dZeSLAN7GPjGa8u+fxYi0ulLAwQfCCvudCq2pHf38JId7nzDazgJl3UrhwNsHk0DHd E2WWFzQylv08W2SFczd9/8UBfzukj+xJuRp+e5IXiS9IbzqD2T20n+rLx1/U3Q896kjT RKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052418; x=1796657218; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=luBZx3BfiW/joDN51sp4X0lJKx3O3GRmYjsRqhzLBvQ=; b=uXKi+ceWADnCVW1iI7kSltEAsl6JpNIWJXwUCkLb810cPEvI0K6t9Emfj9SmlQjO6h rlM7E6R+9QJrLolMx9153Iz2e5/4Ee4MVUBPtevxsF4ZOarAS0CU/G5uCT//VpXmOwZI aRqwHk3rsIglTpV8KwrJd3h7GZFC4nbTEZfXN9bowperrWCIgYmYER/5J0hb528GpHJh uS4SMcu2Hyou8YcqWR8Bd1giECXROk7cHW1GiXSEYDr4ufXBjqF7p1O8+9sd/QpmRYGN MDpwA9Stwgfpks7zvbkRnaT7TD2k5s6AtH9IpMtwDVBaQdJc/2L3mB1FhTy0dE6AkKZz /RpA== X-Gm-Message-State: APuU4Z+7LwzIF0tVK/CXUF8/56Un0BzUO29G1R6VTn70uDogpo0d9ebK dRz2+u0p7ppH/gei6Qz6Fiu4ZNP23jYZKFlbtWlxP8uBoXf6hRUi5g0pxPh1C8Hg/9M+nxTUSm8 0xXfXc62e2g== X-Received: from qkhm5.prod.google.com ([2002:a05:620a:2205:b0:93f:2194:e3a7]) (user=willemb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:620a:1992:b0:949:743e:9149 with SMTP id af79cd13be357-949ba8239bdmr6370721085a.6.1796052418122; Mon, 30 Nov 2026 07:26:58 -0800 (PST) Date: Mon, 30 Nov 2026 10:26:57 -0500 In-Reply-To: <20261122113703.30415-1-shijianlin11@foxmail.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <179533878871.3294.14009692721054097098@kernel.org> <20261122113703.30415-1-shijianlin11@foxmail.com> Message-ID: Subject: Re: [PATCH net v3 0/2] virtio-net/dim: fix irq moderation init failure unwind From: willemb@google.com To: Jianlin Shi , netdev-bot+sinfo@kernel.org Cc: netdev@vger.kernel.org, mst@redhat.com, jasowang@kernel.org, eperezma@redhat.com, xuanzhuo@tsinghua.org.cn, andrew+netdev@amiga.org.uk, davem@davemloft.net, edumazet@gmail.com, kuba@kernel.org, pabeni@redhat.com, talgi@efi.com, hengqi@loongson.cn, horms@kernel.org, virtualization@vger.kernel.org Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Jianlin Shi wrote: > I noticed this while working through the virtio-net probe error > paths. It was not a production incident and not a syzbot report. > I did not hit the allocation failure at runtime, so there is no > stack trace. > virtnet_probe() calls init_vqs() and then virtnet_init_irq_moder(). > If kmemdup() fails there, the error path does "goto free" and skips > virtio_reset_device() and virtnet_del_vqs(), so the virtqueues and > their DMA mappings leak. That only happens on ENOMEM during probe. > The dangling dev->irq_moder is not used on current mainline. That > failure path never calls net_dim_free_irq_moder(). Patch 1 is only > there so the unwind in patch 2 does not use-after-free the object. > Jianlin Since this allocation-failure error path was found by code inspection and not hit at runtime, please retarget it to net-next. Keep the Fixes tags, and Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path. And refresh the maintainer CCs using scripts/get_maintainer.pl.