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 4EC15455AD for ; Mon, 15 Jul 2024 17:29:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B245440A71; Mon, 15 Jul 2024 17:29:05 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 91D3D402DD for ; Mon, 15 Jul 2024 17:29:04 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-426717a2d12so26589855e9.0 for ; Mon, 15 Jul 2024 08:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057344; x=1721662144; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jCTMZdiN6ygzf3rfJIx69f6kDhqvTzB4sMLfvJaBdp8=; b=k6BpgEHVBSP+epdWhYSYaAEX485XqQX09sJ0aaOix+b2jDC7///yJyf14wfKvXmhlT Tda7+3cxkfe0f6JIEQJ4W3B1XiN4kieLSWr0Y8TT1ETHppFpKasKTsSa3GJLWgf6aHci hYS6jKd6DjojA75gUidVw52lP7nfnW0A5tJ7AfB1Q3pesShVo2nA0ykUHQKnfzMpzeWP s8AQ688uEv00GkkqwMzk2SizuXFu4JkoS55dgsn3dF3Jp3CdfZ/hXfi89PalFHyyIXvG JJbXDzOZvUjV2J7YiOak6/nlbINx3Dj9aRkOz8w9FeWuicGdQJ5X7HSeERVp14QZnviI 6nbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057344; x=1721662144; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jCTMZdiN6ygzf3rfJIx69f6kDhqvTzB4sMLfvJaBdp8=; b=UaamMWn6Ex/mRNNFw2kRJ5U8hlLi0U45LHdncAfvbMnC8GSIfBYCGJufA68030ZZCM ZRWnImIAcZCe4veme5CDbTlZS6k5F70mRE4Jue/n+HhRnlbJcvUcfarduVQeWDHNcomH tlQwhxPLf7EvT6iQGcPz3lSXy6H8aDQwF1uXIOyS0DowL3dtmPaujT5jJD373P+YcJgh IO04F1YHcaDSz+auIno5z2RBtsxuw7wKbo/w2meMBnQcKL5G+rvPDADXr7Ss0SdB5KDL YQxO9t0VPSeED7eqs65ixYmJt3QLoOOQe6sQav11OfROzVlgmjCCDr7DPKu0azJ6ZLmm 0y+A== X-Forwarded-Encrypted: i=1; AJvYcCWqZGFHgUDx7o9JNiym+EjLV1Qm6h9ZQ/P0b74gVtzL9fgdE/9jcknsRV/s+HQOW/fRDDoiaUfoV5fo1ynrwXo= X-Gm-Message-State: AOJu0YxMUkPN42Oka3LcbnglE9DFutqr/iXNoA651qUJ+Bn3uBKEF+lx LT9ueitcp0QPcSphL1BQSgI4Jvj+8NcLvJixbkYezCWQKqzddT6mnY+UNE9+ X-Google-Smtp-Source: AGHT+IF81DA0EWBBcjSw78KvaYU4RMPZtk0jaZxGv6K4cC8NLt2ZfCmQ7quH+gSdoOQtIbeQFMSSFA== X-Received: by 2002:a05:600c:46cb:b0:426:606e:f526 with SMTP id 5b1f17b1804b1-427b868ed24mr1768665e9.20.1721057344207; Mon, 15 Jul 2024 08:29:04 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dafb877sm6746586f8f.69.2024.07.15.08.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:03 -0700 (PDT) From: luca.boccassi@gmail.com To: Apeksha Gupta Cc: Vanshika Shukla , dpdk stable Subject: patch 'bus/dpaa: fix memory leak in bus scan' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:14 +0100 Message-Id: <20240715152704.2229503-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/75332a8da8bfa24d03d24267470feeb38eab0eb8 Thanks. Luca Boccassi --- >From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001 From: Apeksha Gupta Date: Wed, 10 Jul 2024 14:25:28 +0530 Subject: [PATCH] bus/dpaa: fix memory leak in bus scan [ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ] Resource leak: variable dev is going out of scope leaks the storage. Coverity issue: 373703 Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") Signed-off-by: Apeksha Gupta Signed-off-by: Vanshika Shukla --- drivers/bus/dpaa/dpaa_bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 0823553398..aaf2a5f43e 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -187,6 +187,7 @@ dpaa_create_device_list(void) if (dev->intr_handle == NULL) { DPAA_BUS_LOG(ERR, "Failed to allocate intr handle"); ret = -ENOMEM; + free(dev); goto cleanup; } @@ -238,6 +239,7 @@ dpaa_create_device_list(void) if (dev->intr_handle == NULL) { DPAA_BUS_LOG(ERR, "Failed to allocate intr handle"); ret = -ENOMEM; + free(dev); goto cleanup; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:36.502998244 +0100 +++ 0036-bus-dpaa-fix-memory-leak-in-bus-scan.patch 2024-07-15 16:19:34.532205695 +0100 @@ -1 +1 @@ -From de0833ffe31739fd40789b1580025bc849d8871f Mon Sep 17 00:00:00 2001 +From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index b8f41ec069..1f6997c77e 100644 +index 0823553398..aaf2a5f43e 100644 @@ -23 +24 @@ -@@ -188,6 +188,7 @@ dpaa_create_device_list(void) +@@ -187,6 +187,7 @@ dpaa_create_device_list(void) @@ -31 +32 @@ -@@ -239,6 +240,7 @@ dpaa_create_device_list(void) +@@ -238,6 +239,7 @@ dpaa_create_device_list(void)