[dpdk-stable] patch 'net/bnx2x: fix memzone name overrun' has been queued to LTS release 16.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 16 12:09:45 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.7

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/18/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 2b7cddab9ed2d66904a57853c11768e7ab1c7bf4 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Mon, 14 May 2018 13:04:43 +0800
Subject: [PATCH] net/bnx2x: fix memzone name overrun

[ upstream commit 52f766443423a7728a9dedda13fd8b23d7e50665 ]

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
Acked-by: Rasesh Mody <rasesh.mody at cavium.com>
---
 drivers/net/bnx2x/bnx2x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 9ad9d2baa..c2842e3a2 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -170,10 +170,10 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
 
 	dma->sc = sc;
 	if (IS_PF(sc))
-		sprintf(mz_name, "bnx2x%d_%s_%" PRIx64, SC_ABS_FUNC(sc), msg,
+		snprintf(mz_name, sizeof(mz_name), "bnx2x%d_%s_%" PRIx64, SC_ABS_FUNC(sc), msg,
 			rte_get_timer_cycles());
 	else
-		sprintf(mz_name, "bnx2x%d_%s_%" PRIx64, sc->pcie_device, msg,
+		snprintf(mz_name, sizeof(mz_name), "bnx2x%d_%s_%" PRIx64, sc->pcie_device, msg,
 			rte_get_timer_cycles());
 
 	/* Caller must take care that strlen(mz_name) < RTE_MEMZONE_NAMESIZE */
-- 
2.14.2



More information about the stable mailing list