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 0CCFDA0524 for ; Fri, 5 Feb 2021 12:36:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03D2A4067B; Fri, 5 Feb 2021 12:36:52 +0100 (CET) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id 95C1918892B for ; Fri, 5 Feb 2021 12:36:50 +0100 (CET) Received: by mail-wm1-f52.google.com with SMTP id j11so5748312wmi.3 for ; Fri, 05 Feb 2021 03:36:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Z2oEyc2n3Xi4xlf3Juwado0Uyu+cSBYnRC2OSSWsGk=; b=kSmbrISLQMRUPNnRxqNK0FNs7TSsmYaUyLkPbLB8GeWGZgMuEE6Ky4QZVrav2Thsm6 Jp8BSAwxctCF8eh4P+El3spsvLHXKwNkVLXQ62770Z+XLdpw6FnMzaxGXi6YZFRa+OUK zK0TsOGE3A5P6W5j6BcXVw8B5d+f4VSdAoWJ2fxUdT9T4DMbrF9e5FHl+cvzuH9Sqpm5 amEqNKwnjXJPPMlJ8BWW73bUf1UPWV8T4fEl2T81Xf9vzaFMZigJsGOMMwMi0qm76j5B oJgivY/gNKRmkFwrdYxcj7XjC/xapt/52URQzGM+Ut5n9VYNxx0Y96VN4j63Q9qqqT0J A+Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Z2oEyc2n3Xi4xlf3Juwado0Uyu+cSBYnRC2OSSWsGk=; b=CR4tXdl6dNfejMwlA/lGNRxgsN0j5nOOU78Kt9qhuYJHEkZbSWLN6AcfLOvMYVAtzW pJfwVNobtSI3Ka2yXxuYE0pamp0tpUyOAK+UxqSx1vfI8uPZItrb+UR41Xq1taaKWky6 fX3r+F53oqwwpQZBFvthmqa8SVsEAx5bTp0RP2bFn8RHYM+8UK2vQsiXHAS1vb3EjZQE cfUPQ4srXyJFJv66DjhxCVtLuvvnhSvtCS8A8IJYuQzfws5g20DX3gD5oLWQup0PL83R ukumojxyxEinlJZvVJp5UuqkmuecgQZU0CvE2a5s+SmZvyyXY4n+PN997RO43nc42Z0w yM6Q== X-Gm-Message-State: AOAM533pNtklHc0aJ5J1XrE2enxq5COeFtAT0Jk+58q/fQ/Bl0ehX91n nYEoIjxcvlm2KjLpPsiuxBo= X-Google-Smtp-Source: ABdhPJwn14YAUycm3wyjA9FCZumUVZsNpm6T3z1PpJEDN+bC1KXk8xv+xpq73GGMD24qveigMXEwlA== X-Received: by 2002:a1c:4d13:: with SMTP id o19mr3332708wmh.134.1612525010355; Fri, 05 Feb 2021 03:36:50 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i6sm11356112wrv.21.2021.02.05.03.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:36:49 -0800 (PST) From: luca.boccassi@gmail.com To: Gagandeep Singh Cc: Akhil Goyal , dpdk stable Date: Fri, 5 Feb 2021 11:18:24 +0000 Message-Id: <20210205111920.1272063-218-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. 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/fc49e71f7960433a4cacff40a2e62623a25471e2 Thanks. Luca Boccassi --- >From fc49e71f7960433a4cacff40a2e62623a25471e2 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Mon, 25 Jan 2021 16:15:34 +0800 Subject: [PATCH] crypto/dpaa2_sec: fix memory allocation check [ upstream commit 9a494a3b90aad48f5f3f4ced14104f3347723c1b ] When key length is 0, zmalloc will return NULL pointer and in that case it should not return NOMEM. So in this patch, adding a check on key length. Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation") Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 6ff0d833e9..5d91bf910e 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1842,7 +1842,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev, session->ctxt_type = DPAA2_SEC_CIPHER; session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length, RTE_CACHE_LINE_SIZE); - if (session->cipher_key.data == NULL) { + if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) { DPAA2_SEC_ERR("No Memory for cipher key"); rte_free(priv); return -ENOMEM; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:38.809477822 +0000 +++ 0218-crypto-dpaa2_sec-fix-memory-allocation-check.patch 2021-02-05 11:18:29.174698119 +0000 @@ -1 +1 @@ -From 9a494a3b90aad48f5f3f4ced14104f3347723c1b Mon Sep 17 00:00:00 2001 +From fc49e71f7960433a4cacff40a2e62623a25471e2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9a494a3b90aad48f5f3f4ced14104f3347723c1b ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index cab79db3dc..05b194ccff 100644 +index 6ff0d833e9..5d91bf910e 100644