From: Simon Horman <horms@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Pavan Kumar Linga <pavan.kumar.linga@intel.com>,
nex.sw.ncis.osdt.itp.upstreaming@intel.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Michal Kubiak <michal.kubiak@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jakub Kicinski <kuba@kernel.org>,
intel-wired-lan@lists.osuosl.org, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration
Date: Fri, 26 Jul 2024 17:16:08 +0100 [thread overview]
Message-ID: <20240726161608.GP97837@kernel.org> (raw)
In-Reply-To: <20240724134024.2182959-3-aleksander.lobakin@intel.com>
On Wed, Jul 24, 2024 at 03:40:23PM +0200, Alexander Lobakin wrote:
> From: Michal Kubiak <michal.kubiak@intel.com>
>
> The initialization of vport interrupt consists of two functions:
> 1) idpf_vport_intr_init() where a generic configuration is done
> 2) idpf_vport_intr_req_irq() where the irq for each q_vector is
> requested.
>
> The first function used to create a base name for each interrupt using
> "kasprintf()" call. Unfortunately, although that call allocated memory
> for a text buffer, that memory was never released.
>
> Fix this by removing creating the interrupt base name in 1).
> Instead, always create a full interrupt name in the function 2), because
> there is no need to create a base name separately, considering that the
> function 2) is never called out of idpf_vport_intr_init() context.
>
> Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport")
> Cc: stable@vger.kernel.org # 6.7
> Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
> Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: intel-wired-lan@lists.osuosl.org,
Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
nex.sw.ncis.osdt.itp.upstreaming@intel.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Michal Kubiak <michal.kubiak@intel.com>,
stable@vger.kernel.org,
Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Subject: Re: [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration
Date: Fri, 26 Jul 2024 17:16:08 +0100 [thread overview]
Message-ID: <20240726161608.GP97837@kernel.org> (raw)
In-Reply-To: <20240724134024.2182959-3-aleksander.lobakin@intel.com>
On Wed, Jul 24, 2024 at 03:40:23PM +0200, Alexander Lobakin wrote:
> From: Michal Kubiak <michal.kubiak@intel.com>
>
> The initialization of vport interrupt consists of two functions:
> 1) idpf_vport_intr_init() where a generic configuration is done
> 2) idpf_vport_intr_req_irq() where the irq for each q_vector is
> requested.
>
> The first function used to create a base name for each interrupt using
> "kasprintf()" call. Unfortunately, although that call allocated memory
> for a text buffer, that memory was never released.
>
> Fix this by removing creating the interrupt base name in 1).
> Instead, always create a full interrupt name in the function 2), because
> there is no need to create a base name separately, considering that the
> function 2) is never called out of idpf_vport_intr_init() context.
>
> Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport")
> Cc: stable@vger.kernel.org # 6.7
> Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
> Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-07-26 16:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 13:40 [Intel-wired-lan] [PATCH iwl-net 0/3] idpf: fix 3 bugs revealed by the Chapter I Alexander Lobakin
2024-07-24 13:40 ` Alexander Lobakin
2024-07-24 13:40 ` [Intel-wired-lan] [PATCH iwl-net 1/3] idpf: fix memory leaks and crashes while performing a soft reset Alexander Lobakin
2024-07-24 13:40 ` Alexander Lobakin
2024-07-26 16:09 ` [Intel-wired-lan] " Simon Horman
2024-07-26 16:09 ` Simon Horman
2024-07-29 8:54 ` [Intel-wired-lan] " Alexander Lobakin
2024-07-29 8:54 ` Alexander Lobakin
2024-07-30 11:03 ` [Intel-wired-lan] " Simon Horman
2024-07-30 11:03 ` Simon Horman
2024-07-30 16:37 ` [Intel-wired-lan] " Simon Horman
2024-07-30 16:37 ` Simon Horman
2024-08-02 0:21 ` [Intel-wired-lan] " Singh, Krishneil K
2024-08-02 0:21 ` Singh, Krishneil K
2024-07-24 13:40 ` [Intel-wired-lan] [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration Alexander Lobakin
2024-07-24 13:40 ` Alexander Lobakin
2024-07-26 16:16 ` Simon Horman [this message]
2024-07-26 16:16 ` Simon Horman
2024-08-02 0:22 ` [Intel-wired-lan] " Singh, Krishneil K
2024-08-02 0:22 ` Singh, Krishneil K
2024-07-24 13:40 ` [Intel-wired-lan] [PATCH iwl-net 3/3] idpf: fix UAFs when destroying the queues Alexander Lobakin
2024-07-24 13:40 ` Alexander Lobakin
2024-07-26 16:22 ` [Intel-wired-lan] " Simon Horman
2024-07-26 16:22 ` Simon Horman
2024-08-02 0:23 ` [Intel-wired-lan] " Singh, Krishneil K
2024-08-02 0:23 ` Singh, Krishneil K
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=20240726161608.GP97837@kernel.org \
--to=horms@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nex.sw.ncis.osdt.itp.upstreaming@intel.com \
--cc=pabeni@redhat.com \
--cc=pavan.kumar.linga@intel.com \
--cc=stable@vger.kernel.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.