All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: <xuanqiang.luo@linux.dev>, <intel-wired-lan@lists.osuosl.org>
Cc: <przemyslaw.kitszel@intel.com>, <andrew+netdev@lunn.ch>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <roel.kluin@gmail.com>, <tactii@gmail.com>,
	<netdev@vger.kernel.org>, Xuanqiang Luo <luoxuanqiang@kylinos.cn>,
	<stable@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v1] igbvf: fix DMA mapping leak on Tx error
Date: Thu, 30 Jul 2026 15:35:59 -0700	[thread overview]
Message-ID: <02f446c3-9d50-439a-bcb5-d3838e793fb1@intel.com> (raw)
In-Reply-To: <20260721092323.39372-1-xuanqiang.luo@linux.dev>



On 7/21/2026 2:23 AM, xuanqiang.luo@linux.dev wrote:
> From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
> 
> When mapping a fragmented skb fails, count already matches the number of
> successful mappings that must be undone. Decrementing it before the cleanup
> loop leaves one mapping active. Reusing the descriptor then overwrites its
> DMA address and loses the mapping.
> 
> Remove the extra decrement so the error path unmaps every successful
> mapping.

Thanks for the patch Xuanqiang, but we had one submitted for this already.

https://lore.kernel.org/intel-wired-lan/20260417033452.640551-1-tactii@gmail.com/

Thanks,
Tony

> Fixes: c1fa347f20f1 ("e1000/e1000e/igb/igbvf/ixgb/ixgbe: Fix tests of unsigned in *_tx_map()")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
> ---
>   drivers/net/ethernet/intel/igbvf/netdev.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
> index c5ae15fcdca75..3d2aba5c3f126 100644
> --- a/drivers/net/ethernet/intel/igbvf/netdev.c
> +++ b/drivers/net/ethernet/intel/igbvf/netdev.c
> @@ -2190,8 +2190,6 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter,
>   	buffer_info->time_stamp = 0;
>   	buffer_info->length = 0;
>   	buffer_info->mapped_as_page = false;
> -	if (count)
> -		count--;
>   
>   	/* clear timestamp and dma mappings for remaining portion of packet */
>   	while (count--) {


      parent reply	other threads:[~2026-07-30 22:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  9:23 [PATCH iwl-net v1] igbvf: fix DMA mapping leak on Tx error xuanqiang.luo
2026-07-21  9:23 ` [Intel-wired-lan] " xuanqiang.luo
2026-07-23  9:16 ` Loktionov, Aleksandr
2026-07-23  9:16   ` Loktionov, Aleksandr
2026-07-30 22:35 ` Tony Nguyen [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=02f446c3-9d50-439a-bcb5-d3838e793fb1@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=luoxuanqiang@kylinos.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=roel.kluin@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tactii@gmail.com \
    --cc=xuanqiang.luo@linux.dev \
    /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.