DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process
@ 2018-09-21 16:25 Paul Luse
  2018-09-21 16:53 ` Ferruh Yigit
  2018-09-27 13:28 ` Ferruh Yigit
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Luse @ 2018-09-21 16:25 UTC (permalink / raw)
  To: dev; +Cc: paul luse

From: paul luse <paul.e.luse@intel.com>

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 <paul.e.luse@intel.com>
---
 drivers/bus/vdev/vdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 69dee89a8..2566d6c0d 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -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");
 
-- 
2.14.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process
  2018-09-21 16:25 [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process Paul Luse
@ 2018-09-21 16:53 ` Ferruh Yigit
  2018-09-27 13:28 ` Ferruh Yigit
  1 sibling, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2018-09-21 16:53 UTC (permalink / raw)
  To: Paul Luse, dev

On 9/21/2018 5:25 PM, Paul Luse wrote:
> From: paul luse <paul.e.luse@intel.com>
> 
> 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 <paul.e.luse@intel.com>

Hi Paul,

Is this different from below patch, which seems already acked:
https://patches.dpdk.org/patch/45079/


> ---
>  drivers/bus/vdev/vdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
> index 69dee89a8..2566d6c0d 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -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");
>  
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process
  2018-09-21 16:25 [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process Paul Luse
  2018-09-21 16:53 ` Ferruh Yigit
@ 2018-09-27 13:28 ` Ferruh Yigit
  2018-10-25  7:28   ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2018-09-27 13:28 UTC (permalink / raw)
  To: Paul Luse; +Cc: dev, Anatoly Burakov

On 9/21/2018 5:25 PM, Paul Luse wrote:
> From: paul luse <paul.e.luse@intel.com>
> 
> 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 <paul.e.luse@intel.com>

(carry from Anatoly's ack from other thread)
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>


@Anatoly, what do you think about:
 diff --git a/lib/librte_eal/common/include/rte_eal.h
b/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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process
  2018-09-27 13:28 ` Ferruh Yigit
@ 2018-10-25  7:28   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-10-25  7:28 UTC (permalink / raw)
  To: Ferruh Yigit, Paul Luse; +Cc: dev, Anatoly Burakov

27/09/2018 15:28, Ferruh Yigit:
> On 9/21/2018 5:25 PM, Paul Luse wrote:
> > From: paul luse <paul.e.luse@intel.com>
> > 
> > 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 <paul.e.luse@intel.com>
> 
> (carry from Anatoly's ack from other thread)
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Adding Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: stable@dpdk.org

> @Anatoly, what do you think about:
>  diff --git a/lib/librte_eal/common/include/rte_eal.h
> b/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.

Adding this change to the commit.

Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")

All applied, thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process
  2018-09-20 23:29 paul luse
@ 2018-09-21 11:07 ` Burakov, Anatoly
  0 siblings, 0 replies; 6+ messages in thread
From: Burakov, Anatoly @ 2018-09-21 11:07 UTC (permalink / raw)
  To: paul luse, dev

On 21-Sep-18 12:29 AM, paul luse wrote:
> 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 <peluse@cox.net>
> ---
>   drivers/bus/vdev/vdev.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
> index 69dee89a8..2566d6c0d 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -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");
>   
> 
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process
@ 2018-09-20 23:29 paul luse
  2018-09-21 11:07 ` Burakov, Anatoly
  0 siblings, 1 reply; 6+ messages in thread
From: paul luse @ 2018-09-20 23:29 UTC (permalink / raw)
  To: dev

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 <peluse@cox.net>
---
 drivers/bus/vdev/vdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 69dee89a8..2566d6c0d 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -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");
 
-- 
2.17.1 (Apple Git-112)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-25  7:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21 16:25 [dpdk-dev] [PATCH] vdev: free reply.msgs memory for secondary process Paul Luse
2018-09-21 16:53 ` Ferruh Yigit
2018-09-27 13:28 ` Ferruh Yigit
2018-10-25  7:28   ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2018-09-20 23:29 paul luse
2018-09-21 11:07 ` Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).