From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9E0145B08; Thu, 10 Oct 2024 19:17:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A57D3402A3; Thu, 10 Oct 2024 19:17:35 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 6D14840144 for ; Thu, 10 Oct 2024 19:17:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728580654; 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=5YvAyMwSRzAvsYf80+/JqVZ2lwYFSgYkAam3mFsKx40=; b=ZTNdaery4MfEL59R7xJTYfS7UBOs8Y+t/0Jp0ALN+brcBOanOIihXATT1ufvLfn6JlWITx FRFqPFcunsN0OYBjd/hUESO+2Ljz+TjLP3e8InxSIykzrUwg5WxAoLcMcUCV9l51Mo58N7 mTO/odri+MiP4Ew1wr7IFhQpcw7koHQ= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629-RY8W37SGP5GHQ8y7yna_6Q-1; Thu, 10 Oct 2024 13:17:32 -0400 X-MC-Unique: RY8W37SGP5GHQ8y7yna_6Q-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2fadadb092dso6392911fa.1 for ; Thu, 10 Oct 2024 10:17:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728580651; x=1729185451; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5YvAyMwSRzAvsYf80+/JqVZ2lwYFSgYkAam3mFsKx40=; b=lUTDxe24WiGm0RgKJzV9M75BAE6Zpp1zjYh6Noe5fjLdoH3l+9Eg1JtID2LDHu8RTI ZnFExi6dZtizVbmJE2b6Q4mhQ11nK+AGt0pllx/xg4o/99yV3bYKfMGoPEYDhCkmNYVZ zAOz0GNIMh730BHOVux1Rv7ztguA82t3Gi9JNkPjxm926+W3/1o3s79aYSDkzeWQVhB1 5lsoQXyCwjyUQjg/ItXRFjHw98sDSt5D8T9H5dHeHhEyT5fLIpEwkoDi3ajvCrabrXVH c/D8cHmZbY4Ij4E8yo7EEaFgkQqLzsjHRvc144gWWu9BB3MaSqz/0vv/c6froP9xZnvU jyAg== X-Gm-Message-State: AOJu0YxsX8Y+RvHeAG0legOOLlQ6Zk3uJDIF7mw7iYCLC64MDxhKCUpW s7OGvDGg7RbW07JcYZjXVGj7Iqaccr7pZ9yQNmUZjyBy4FW8gHdUBPZcqddSdioakaALdH0QaDr mjPdQRaU8ZGC3r1fOfgpL8YdhzgGLp4aI813/GON298IRYqtvk8149QwHnKCWdAs6IKgjM+JU5I T1tJ0WFsZRvZpvhKc= X-Received: by 2002:a05:651c:b0c:b0:2fa:ce77:c475 with SMTP id 38308e7fff4ca-2fb207ac352mr14251771fa.5.1728580651319; Thu, 10 Oct 2024 10:17:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuPOQDEnZH0JVlTUpg0TT9oXTECOHsLEmuitbRDhqfGGd5Uh/fbr6F/SX4CiU9KRT6RBiIza/CYlke4pIaeB4= X-Received: by 2002:a05:651c:b0c:b0:2fa:ce77:c475 with SMTP id 38308e7fff4ca-2fb207ac352mr14251651fa.5.1728580650867; Thu, 10 Oct 2024 10:17:30 -0700 (PDT) MIME-Version: 1.0 References: <20241010171547.2510123-1-thomas@monjalon.net> In-Reply-To: <20241010171547.2510123-1-thomas@monjalon.net> From: David Marchand Date: Thu, 10 Oct 2024 19:17:19 +0200 Message-ID: Subject: Re: [PATCH] net/nfb: fix use after free To: Thomas Monjalon Cc: dev@dpdk.org, Martin Spinler , Anatoly Burakov , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Stephen Hemminger , Chengwen Feng , Wathsala Vithanage X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Oct 10, 2024 at 7:16=E2=80=AFPM Thomas Monjalon wrote: > > With the annotations added to the allocation functions, > more issues are detected at compilation time: > > nfb_rx.c:133:28: error: pointer 'rxq' used after 'rte_free' > > It is fixed by moving the assignment before freeing the parent pointer. > > Fixes: 80da7efbb4c4 ("eal: annotate allocation functions") > > Signed-off-by: Thomas Monjalon Reviewed-by: David Marchand --=20 David Marchand