From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 3286E1B818 for ; Tue, 15 May 2018 15:49:09 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id j4-v6so1191443wme.1 for ; Tue, 15 May 2018 06:49:09 -0700 (PDT) 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; bh=c9NNzudX4a5RQx7+tcLFlmgFgQqh0prFE6ovWveufoo=; b=Pewj7e2XZGlQgZanhpwoRN//mY+BoWIjk3bWK0d3HfRLtp4PcSdC0NhWn0Vt0ROyUq SRGpRLzE2+bTRpj8EYXE0n5hIFXst6IsF3eXoANph2oxKPNCAtznIWwKpf5XTpu9Jttd lw9kVgirT1fdmUW/0el7LuSjnv4HBrze/YO5wzCYCrWxDp7WuYvxgi5O0VUwQlVephE/ ssWZcPoSunAIbB8Z3K8l0wHXNetkTLuXz9etCegF0TJRIMdulcJg/zwNi8iIZ9HUfLx3 hW+vxSBH1t1G5xTfMJwb286UJ/wVEQKEsYtXBfJPpG4DZi5kDT0GA3qB9ZKx9L2yZsTQ qOOg== 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; bh=c9NNzudX4a5RQx7+tcLFlmgFgQqh0prFE6ovWveufoo=; b=eUOhZgwT3ivRLMNWaaR9JWWAWH1AWg7o+DV/YYFibtP9oCJLmzkzUIaCjWcwK6emOe HBPDHA775w+QbNOfpcYggi8eYN+PlLFqmSfqF4JHTwBkWxHQxBEWcxdnkvj5ehx970Tv yJyK6Wr4H5wU5YAzsr4hpi31m/+Y0CK0BkcNsGzKsc+SRTm/mDcVEIL3bA/M2Qi9fH/T uKF2k2gvNhUqk7qKWnVspxfa5L8zFbKs30X8OHecRkpBDm5TIqYtuvv6jz8hv0fwR9xG EZMHZwVbtqbwN19hNRXH6cs4LPAk9zc6Ghx08OT13w+qGXsIwa2OmZL8OC+FtLEYvDf9 HDSg== X-Gm-Message-State: ALKqPwflT3js5eq0mLh9MT/a0xCYiTB3SxfEo3gfeUoTcKvWK812CQDq xj14MaOjG+2n17bBpLV8HfU= X-Google-Smtp-Source: AB8JxZrSL6dPsry8IZ1oD5ZS+PXLRQiln+6C5JrKSqtWa90VMUEVflbEDjxjpEipH/dpswkA3S1q9A== X-Received: by 2002:a1c:1d02:: with SMTP id d2-v6mr7876527wmd.44.1526392148907; Tue, 15 May 2018 06:49:08 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id x7-v6sm137635wrm.35.2018.05.15.06.49.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:49:07 -0700 (PDT) From: luca.boccassi@gmail.com To: Raslan Darawsheh Cc: Yongseok Koh , dpdk stable Date: Tue, 15 May 2018 14:47:03 +0100 Message-Id: <20180515134731.9337-52-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx5: fix double free on error handling' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 13:49:09 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 2f982d9a3f8a4431192f57ce2df12c0a5f46d010 Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Tue, 8 May 2018 12:11:26 +0300 Subject: [PATCH] net/mlx5: fix double free on error handling [ upstream commit e9f4166014cb7abf8c74b913ff046487d0e7bea2 ] When attr_ctx is NULL it will attempt to free the list of devices twice. Avoid double freeing the list by directly going to error handling. Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters") Signed-off-by: Raslan Darawsheh Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index b9e9fa9f1..9cd4243e4 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -636,16 +636,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, break; } if (attr_ctx == NULL) { - mlx5_glue->free_device_list(list); switch (err) { case 0: ERROR("cannot access device, is mlx5_ib loaded?"); err = ENODEV; - goto error; + break; case EINVAL: ERROR("cannot use device, are drivers up to date?"); - goto error; + break; } + goto error; } ibv_dev = list[i]; DEBUG("device opened"); -- 2.14.2