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 3C5A645A9F for ; Wed, 2 Oct 2024 20:39:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 360FC40652; Wed, 2 Oct 2024 20:39:34 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 589FD402AF for ; Wed, 2 Oct 2024 20:39:30 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7db0fb03df5so34813a12.3 for ; Wed, 02 Oct 2024 11:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727894369; x=1728499169; 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=iuNayhWy1Q2KV5NuT+txJG++Xies/w8sMO8eolMTMf8=; b=twrnFk3+K8eQ29TbVsTaNHI7oYXzVyQdc3k0J+VFos69tkDrWGAeFQ8BT49F4lvroA /RS58zfy+hQcdgHR6eFLh3hIEOglbHaK/UjSNd7XeV5DASVcuqMEiG+wDpXd7pkkPqtj 8ubeOYMM9JFg8acJgOPNqMGDSnd0jImVxlDEi/FlEkEdJuWV1b48Pj/TZvDoQuiTaGDW 09KzOWbqgy2X59ItwzPVRkPDUD2fzbxjo3RonGPob6KaDkq0N62UXzVC90qFQgh9Hjp/ PIWdCtMnUc0VVJzjunLAFuy5B613HNoRxeHS/v/8G4xdBlSGm+ORBDVuWoHZUVD3UHZY DStA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727894369; x=1728499169; 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=iuNayhWy1Q2KV5NuT+txJG++Xies/w8sMO8eolMTMf8=; b=fXUFqyqiIUdNyqzBXc1WNvAevOxUa3X/ewjYhmoEJTvy8RIA6DtBcJn6Wv4Ph72nws TJ4GQAJEkRp2rbn3YVVoizFmHTUlbBh4C4sOvsE+TgiC8f01y5+Y1IBW7gVj9yZ08B6q YUaGyJSUz+RnzQ+akC1a8hx4wFaiodCRuOX0fK4bKX6gC+D1+G7+Q/Qh90ABQy3h6yaO sgtRaUQv2Str9ehiv54JJbNfiVvPUZWnY+/UkAh02WpX9XQwXZSSTVylT5YsCkiGFNiB Z0afTMa1ZATFioWeJPoyLd1sF1LYg5emNpI1YWH3R5Ix/4JwjfVbr5ZDNjPFRN11TnWB jf0w== X-Forwarded-Encrypted: i=1; AJvYcCUoda1rGC+AJK2FjUJJofZX0cAjHSEHvlUtENm/GmIleuudc24bXwsQ3zOoD+BxQlGiAEFpw40=@dpdk.org X-Gm-Message-State: AOJu0YwsivkIMzv6sTG+BkW/eEx6SriddsHdgaY0ubpy4TMCMrHyZxO9 WazNwir9yYFk6Kuw9G39sJT61I3ZONNbUu2dmY7Y9W6Jq2x4rRO64HctfFKQ40Y= X-Google-Smtp-Source: AGHT+IFHwETDw3DnWaH9KdCGkAHEvn0XYrvnO7XknHnD7JaZG8LwaO6zyEA+53LcwXM8MIFJZrGPWg== X-Received: by 2002:a05:6a20:d818:b0:1d5:14ff:a153 with SMTP id adf61e73a8af0-1d5db20a5a9mr6217784637.12.1727894369547; Wed, 02 Oct 2024 11:39:29 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649b0bdsm10104362b3a.34.2024.10.02.11.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 11:39:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Ajit Khaparde , Vikas Gupta , Akhil Goyal , Raveendra Padasalagi Subject: [PATCH v7 02/16] cryptodev/bcmfs: fix mis-matched free Date: Wed, 2 Oct 2024 11:37:40 -0700 Message-ID: <20241002183918.161656-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002183918.161656-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002183918.161656-1-stephen@networkplumber.org> 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 The device structure is allocated with rte_malloc() and then incorrectly freed with free(). This will lead to corrupt malloc pool. Bugzilla ID: 1552 Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Ajit Khaparde --- drivers/crypto/bcmfs/bcmfs_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c index ada7ba342c..46522970d5 100644 --- a/drivers/crypto/bcmfs/bcmfs_device.c +++ b/drivers/crypto/bcmfs/bcmfs_device.c @@ -139,7 +139,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev, return fsdev; cleanup: - free(fsdev); + rte_free(fsdev); return NULL; } @@ -163,7 +163,7 @@ fsdev_release(struct bcmfs_device *fsdev) return; TAILQ_REMOVE(&fsdev_list, fsdev, next); - free(fsdev); + rte_free(fsdev); } static int -- 2.45.2