patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ali Alnubani <alialnu@nvidia.com>
To: Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Cc: Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	 Eman Hamayel <emanha@nvidia.com>,
	Bassam Zaid AlKilani <bzalkilani@nvidia.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Subject: RE: [PATCH 19.11] net/mlx5: cleanup Netlink interrupt handler
Date: Wed, 7 Dec 2022 12:46:52 +0000	[thread overview]
Message-ID: <DM4PR12MB516765207EE7A8999B284B5EDA1A9@DM4PR12MB5167.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220908093408.2171090-1-dkozlyuk@nvidia.com>

> -----Original Message-----
> From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Sent: Thursday, September 8, 2022 12:34 PM
> To: stable@dpdk.org
> Cc: Suanming Mou <suanmingm@nvidia.com>; Matan Azrad
> <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH 19.11] net/mlx5: cleanup Netlink interrupt handler
> 
> [ upstream commit 17f95513adca1f4ee5bba305b154ac984ee50cee ]
> 
> When the upstream commit was backported by the offending commit,
> the cleanup part of the fix was missed. The interrupt handler
> was not unregistered and the Netlink socket was not closed
> with the device closing. The socket was leaking and the handler
> could continue working with random content in the freed memory:
> 
>     net_mlx5: Failed to process Netlink events: \
>         Socket operation on non-socket
> 
> Fixes: edea6144b47f ("net/mlx5: fix link status change detection")
> 
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Acked-by: Suanming Mou <suanmingm@nvidia.com>
> ---
>  drivers/net/mlx5/mlx5.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index dee018bbba..f3b440635e 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -579,6 +579,11 @@ mlx5_dev_shared_handler_uninstall(struct
> mlx5_ibv_shared *sh)
>  	if (sh->intr_handle.fd >= 0)
>  		mlx5_intr_callback_unregister(&sh->intr_handle,
>  					      mlx5_dev_interrupt_handler, sh);
> +	if (sh->intr_handle_nl.fd >= 0) {
> +		mlx5_intr_callback_unregister(&sh->intr_handle_nl,
> +					      mlx5_dev_interrupt_handler_nl,
> sh);
> +		close(sh->intr_handle_nl.fd);
> +	}
>  #ifdef HAVE_IBV_DEVX_ASYNC
>  	if (sh->intr_handle_devx.fd >= 0)
>  		rte_intr_callback_unregister(&sh->intr_handle_devx,
> --
> 2.25.1

Hi Christian,

Can you please help apply this patch to 19.11?

Thanks,
Ali

      reply	other threads:[~2022-12-07 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  9:34 Dmitry Kozlyuk
2022-12-07 12:46 ` Ali Alnubani [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=DM4PR12MB516765207EE7A8999B284B5EDA1A9@DM4PR12MB5167.namprd12.prod.outlook.com \
    --to=alialnu@nvidia.com \
    --cc=bzalkilani@nvidia.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dkozlyuk@nvidia.com \
    --cc=emanha@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /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 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).