From: Simon Horman <horms@kernel.org>
To: Yeounsu Moon <yyyynoom@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: dlink: handle dma_map_single() failure properly
Date: Fri, 10 Oct 2025 07:55:15 +0100 [thread overview]
Message-ID: <20251010065515.GA3115768@horms.kernel.org> (raw)
In-Reply-To: <20251009155715.1576-2-yyyynoom@gmail.com>
On Fri, Oct 10, 2025 at 12:57:16AM +0900, Yeounsu Moon wrote:
> There is no error handling for `dma_map_single()` failures.
>
> Add error handling by checking `dma_mapping_error()` and freeing
> the `skb` using `dev_kfree_skb()` (process context) when it fails.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
> Tested-on: D-Link DGE-550T Rev-A3
> Suggested-by: Simon Horman <horms@kernel.org>
FWIIW, I don't think my Suggested-by tag is strictly necessary here. I did
suggest an implementation approach. And I'm very happy that you took my
idea on board. But I'd view as more of a tweak in this case. Because the
overall meaning of the patch remains the same as your original version.
> ---
> Changelog:
> v2:
> - fix one thing properly
> - use goto statement, per Simon's suggestion
> v1: https://lore.kernel.org/netdev/20251002152638.1165-1-yyyynoom@gmail.com/
Thanks for the update, this version looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-10-10 6:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 15:57 [PATCH net v2] net: dlink: handle dma_map_single() failure properly Yeounsu Moon
2025-10-10 6:55 ` Simon Horman [this message]
2025-10-10 16:09 ` Yeounsu Moon
2025-10-12 18:10 ` patchwork-bot+netdevbpf
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=20251010065515.GA3115768@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yyyynoom@gmail.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 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.