[PATCH] eal: fix file descriptor leakage with unhandled messages

David Marchand david.marchand at redhat.com
Tue Jul 4 10:37:07 CEST 2023


On Mon, Jul 3, 2023 at 12:31 PM Burakov, Anatoly
<anatoly.burakov at intel.com> wrote:
> On 6/28/2023 1:19 PM, Viacheslav Ovsiienko wrote:
> > The sendmsg()/recvmsg() API is used to establish communication between
> > the DPDK processes. The API supposes inter-process file descriptors
> > sending and conversion, the recipient sees the resulting descriptors
> > in the received message - the operating systems creates ones in the
> > right context.
> >
> > The message receiving is performed by EAL in the dedicated thread
> > and it might happen the message is received by EAL and not handled
> > by addressed PMD or application due to some reasons (timeouts, race
> > condition, etc). EAL just dropped unhandled messages causing the
> > file descriptor leakage if these ones were presented in the message.
> >
> > The patch closes the descriptors (if any) in unhandled messages.
> >
> > Fixes: 783b6e54971 ("eal: add synchronous multi-process communication")

Fixed the Fixes: tag (12 digits for hash).

> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
> Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

Applied, thanks.


-- 
David Marchand



More information about the stable mailing list