Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp376288rdh; Tue, 19 Dec 2023 01:19:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBBySGxGDA/gzbHUG9EyKRcr8oUtMuVuC8qI4k5PbOSnJXw+RbOnMYoD1rqM5pCh18HFn/ X-Received: by 2002:a05:6808:1312:b0:3b9:e239:817d with SMTP id y18-20020a056808131200b003b9e239817dmr11821205oiv.81.1702977573200; Tue, 19 Dec 2023 01:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702977573; cv=none; d=google.com; s=arc-20160816; b=xtjO7vIzpZupd4AjifycdpGhilXz+f2jKr2NwKRnDgvmETPtB838kp1Qlg5nvmHlay Hl+k01IbYOYEvuYVOInSvXBpleWYhemGh0PupEdt82MBaS217M2GAPdKYWPhK6fzwleL 2zGEYT5nJM0Q5rlyX7A2b9676BuI3Lk9wRB63U49oRuDtw4/mxG9Pkfb8zqp/fA2Yb2h OIs8I610kfuR61RC0lFVkQecc+e2N6IZQDafj4FyWGJnE2QMESrJU28zqa+OUzu/b0Io e80U909bNBItE53IgAj/svSJkeVy/asdwELvkGIkXi0eKom6IHfKDO3pcPH8gkTO8UnO DmxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=ZHyjrBTzzv8hgHUAyTnHinUm2FdompoSEVgOa1MaGBo=; fh=0OjDSo9JxJkANqaRfLNecLf2b/cjdCJkXr224Kb4q5s=; b=yoBi8JSlUyC31u+o22yPmoapAEGaLIH3RzpoJdHwaAaN4K+zQOjYdilKrE/UHs1icE cYRl+QOl4Y7Kjx2YWaRcbnV8AFquZ02S4cWtN7VQdNBDaQvl4BIxvZpHaKAdjzS7+nJ4 lbK+LtTz5M0gUaiBW+1u2P1P6JmVZPt96nLBApVhVPgaSUB2WWa/iZ86ZhpezO55Ve32 y7sDhtiPsPQjGvQaN3lf8Vqde583FWBqg7rf71FIZUd4MwB5SVsj0dTEOlTCdHGWyfm2 VRaVx41KJ3Dc4YCxISZ2SHi97wxzQATZZVnjU1p6uWjr7SndB3pOX38N12zbv/zBQiVH wMgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OeYI+tOF; spf=pass (google.com: domain of linux-kernel+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j28-20020a05620a0a5c00b00781094a0db4si16563qka.715.2023.12.19.01.19.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 01:19:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OeYI+tOF; spf=pass (google.com: domain of linux-kernel+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DABEF1C23852 for ; Tue, 19 Dec 2023 09:19:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7649B13AD1; Tue, 19 Dec 2023 09:19:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OeYI+tOF" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4197D134A7 for ; Tue, 19 Dec 2023 09:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702977557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZHyjrBTzzv8hgHUAyTnHinUm2FdompoSEVgOa1MaGBo=; b=OeYI+tOFD7SI8oxWYEgDUN/amSA4F1nUQG0If01+j7Ef2GXk/th/DogpS2iAxn5GcrZQnU roL9MxF7u7i3bnacv9w9OjLNiWbrJXelKxnKPlcsKD2uiwr+9ln4BcQ2p4Ns+CZUMpPUAw TgoUUuidmS9e/drkwqlWiVIztdx6/rw= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-HhQqZ5ucNfyrPdjeY6iuxA-1; Tue, 19 Dec 2023 04:19:15 -0500 X-MC-Unique: HhQqZ5ucNfyrPdjeY6iuxA-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-552ab0a61d0so501379a12.0 for ; Tue, 19 Dec 2023 01:19:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702977554; x=1703582354; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZHyjrBTzzv8hgHUAyTnHinUm2FdompoSEVgOa1MaGBo=; b=se296R/lTy39O4PU3S4e8KDZSDYmOPCoHEbZonKRHlqJnjK3cLDq/lHkAxbhC0zB4W gPAruNM3RXpkIPj8D357Fjfr4o/4gZihbXavONpRG3SYAAtVtOY+JNAzyiXcOLQmOuYJ CcAHbvUvXmY6bqmOtrldeNrWWSMcmHsh/5NuEhg6keY9JvNGJ7+rh4zNqVSQmQvWfBXH qVCGQ0QLd+KypJnL73H0FERXzoRgEVSzB4gWm9JX51jp4LwbTAmlzVrj2856Z7O1A3bi ttoqBwNZ7eiK4qxwQee3KwzI1eiG3Jc0GS/4cXUnyzFNodeF22ywN0BFvEBojKIw632X DdIA== X-Gm-Message-State: AOJu0Yx0/4Rvn9co4QuuQ1MGkBH02J246Vqs/6f9KS06oTFYmQ2qqyja AbJzOPLJMl3H3T+zlt3qXvjKWkCW2zpA1tO0Lpg+ZMKjdIl0nz+LDoogRR7qya0ZpO49GI3KO7Z PChZxK4iD0Av6YDpy+/7qpl/P X-Received: by 2002:a50:9fa6:0:b0:553:1f7:7387 with SMTP id c35-20020a509fa6000000b0055301f77387mr5639704edf.1.1702977554698; Tue, 19 Dec 2023 01:19:14 -0800 (PST) X-Received: by 2002:a50:9fa6:0:b0:553:1f7:7387 with SMTP id c35-20020a509fa6000000b0055301f77387mr5639682edf.1.1702977554343; Tue, 19 Dec 2023 01:19:14 -0800 (PST) Received: from gerbillo.redhat.com (146-241-246-245.dyn.eolo.it. [146.241.246.245]) by smtp.gmail.com with ESMTPSA id i41-20020a0564020f2900b00553854de928sm721798eda.36.2023.12.19.01.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 01:19:14 -0800 (PST) Message-ID: Subject: Re: [PATCH] sfc: fix a double-free bug in efx_probe_filters From: Paolo Abeni To: Zhipeng Lu Cc: Edward Cree , Martin Habets , "David S. Miller" , Eric Dumazet , Jakub Kicinski , netdev@vger.kernel.org, linux-net-drivers@amd.com, linux-kernel@vger.kernel.org Date: Tue, 19 Dec 2023 10:19:12 +0100 In-Reply-To: <20231214152247.3482788-1-alexious@zju.edu.cn> References: <20231214152247.3482788-1-alexious@zju.edu.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi, On Thu, 2023-12-14 at 23:22 +0800, Zhipeng Lu wrote: > In efx_probe_filters, the channel->rps_flow_id is freed in a > efx_for_each_channel marco when success equals to 0. > However, after the following call chain: >=20 > efx_probe_filters > |-> ef100_net_open > |-> ef100_net_stop > |-> efx_remove_filters >=20 > The channel->rps_flow_id is freed again in the efx_for_each_channel of > efx_remove_filters, triggering a double-free bug. >=20 > Fixes: a9dc3d5612ce ("sfc_ef100: RX filter table management and related g= ubbins") > Signed-off-by: Zhipeng Lu The patch LGTM, but could you please update the commit message as per Simon's suggestions make it more consistent? You can retain Simon's RB tag. Thanks! Paolo