From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: stable@dpdk.org, dev@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] kni: fix possible memory leak
Date: Fri, 21 Apr 2017 01:23:40 +0200 [thread overview]
Message-ID: <5601561.lanJxOWneZ@xps> (raw)
In-Reply-To: <20170418142144.6762-1-ferruh.yigit@intel.com>
18/04/2017 16:21, Ferruh Yigit:
> alloc_q and rx_q fifos holds physical address of the mbufs, and not able
> to free those mbufs explicitly.
>
> But kernel thread reads from rx_q and puts used mbufs into free_q (with
> their virtual addresses.) And kernel thread stopped when application
> close the /dev/kni file on exit. So rx_q has time to be consumed by
> kernel thread but leak is technically possible.
>
> Another fifo, alloc_q has physical addresses too, but all those coming
> from same mempool provided by application, when application quit, all
> mempool already returned back, so this leak can be ignored.
>
> Added check and wait logic for rx_q to be sure kernel consumed the fifo,
> an error message printed after some ammount of wait, and an explicit
> mempool free added for alloc_q.
>
> Fixes: 8451269e6d7b ("kni: remove continuous memory restriction")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
prev parent reply other threads:[~2017-04-20 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 14:21 [PATCH] kni: fix possible memory leak Ferruh Yigit
2017-04-20 23:23 ` Thomas Monjalon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5601561.lanJxOWneZ@xps \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.