vdev: free reply.msgs memory for secondary process
PATCH 1/1 vdev: free reply.msgs memory for secondary process
From: paul luse <[email protected]>
This patch fixes an issue caught with ASAN where a vdev_scan() to a secondary bus was failing to free some memory.
--- drivers/bus/vdev/vdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/bus/vdev/vdev.c +1 -0
@@ -423,6 +423,7 @@ vdev_scan(void) mp_rep = &mp_reply.msgs[0 ]; resp = (struct vdev_param *)mp_rep->param;VDEV_LOG (INFO ,"Received %d vdevs" , resp->num); +free (mp_reply.msgs); }else VDEV_LOG (ERR ,"Failed to request vdev from primary" );
Signature · 1 line
2.14.4
Quoted 6 lines · Paul Luse
From: paul luse <[email protected]>
This patch fixes an issue caught with ASAN where a
vdev_scan()to a secondary bus was failing to free some memory.Signed-off-by paul luse <[email protected]>
Hi Paul,
Is this different from below patch, which seems already acked:
https://patches.dpdk.org/patch/45079/
Quoted 17 lines
--- drivers/bus/vdev/vdev.c | 1 + 1 file changed, 1 insertion(+)drivers/bus/vdev/vdev.c +1
-0@@ -423,6 +423,7 @@ vdev_scan(void) mp_rep = &mp_reply.msgs[0 ]; resp = (struct vdev_param *)mp_rep->param;VDEV_LOG (INFO ,"Received %d vdevs" , resp->num); +free (mp_reply.msgs); }else VDEV_LOG (ERR ,"Failed to request vdev from primary" );
Quoted 6 lines · Paul Luse
From: paul luse <[email protected]>
This patch fixes an issue caught with ASAN where a
vdev_scan()to a secondary bus was failing to free some memory.Signed-off-by paul luse <[email protected]>
(carry from Anatoly's ack from other thread)
@Anatoly, what do you think about:
diff --git a/lib/librte_eal/common/include/rte_eal.hb/lib/librte_eal/common/include/rte_eal.h
index e114dcbdc..e1a554f5a 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -309,7 +309,7 @@ rte_mp_sendmsg(struct rte_mp_msg *msg);
* This function sends a request message to the peer process, and will
* block until receiving reply message from the peer process. *
- * @note The caller is responsible to free reply->replies.
+ * @note The caller is responsible to free reply->msgs.
*
* @param req
* The req argument contains the customized request message.
27/09/2018 15:28, Ferruh Yigit:
Quoted 6 lines · Paul Luse
Quoted 5 lines
From: paul luse <[email protected]>
This patch fixes an issue caught with ASAN where a
vdev_scan()to a secondary bus was failing to free some memory.
Quoted 6 lines
Quoted 1 line
Signed-off-by paul luse <[email protected]>(carry from Anatoly's ack from other thread)
Acked-by Anatoly Burakov <[email protected]>Acked-by Ferruh Yigit <[email protected]>
Adding Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: [email protected]
Quoted 7 lines
@Anatoly, what do you think about:
diff --gita/lib/librte_eal/common/include/rte_eal.hb/lib/librte_eal/common/include/rte_eal.h
indexe114dcbdc..e1a554f5a100644
---a/lib/librte_eal/common/include/rte_eal.h
+++b/lib/librte_eal/common/include/rte_eal.h
@@ -309,7 +309,7 @@rte_mp_sendmsg(struct rte_mp_msg *msg);
Quoted 8 lines
* This function sends a request message to the peer process, and will
* block until receiving reply message from the peer process. *
- * @note The caller is responsible to freereply->replies.
+ * @note The caller is responsible to freereply->msgs.
*
* @param req
* The req argument contains the customized request message.
Adding this change to the commit.
All applied, thanks