* [PATCH net-next] ethtool: mm: fix get_mm() return code not propagating to user space
@ 2023-02-06 9:49 Vladimir Oltean
2023-02-06 12:08 ` Simon Horman
2023-02-07 15:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2023-02-06 9:49 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Michal Kubecek
If ops->get_mm() returns a non-zero error code, we goto out_complete,
but there, we return 0. Fix that to propagate the "ret" variable to the
caller. If ops->get_mm() succeeds, it will always return 0.
Fixes: 2b30f8291a30 ("net: ethtool: add support for MAC Merge layer")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
net/ethtool/mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c
index 7e51f7633001..e612856eed8c 100644
--- a/net/ethtool/mm.c
+++ b/net/ethtool/mm.c
@@ -56,7 +56,7 @@ static int mm_prepare_data(const struct ethnl_req_info *req_base,
out_complete:
ethnl_ops_complete(dev);
- return 0;
+ return ret;
}
static int mm_reply_size(const struct ethnl_req_info *req_base,
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ethtool: mm: fix get_mm() return code not propagating to user space
2023-02-06 9:49 [PATCH net-next] ethtool: mm: fix get_mm() return code not propagating to user space Vladimir Oltean
@ 2023-02-06 12:08 ` Simon Horman
2023-02-07 15:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-02-06 12:08 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Michal Kubecek
On Mon, Feb 06, 2023 at 11:49:32AM +0200, Vladimir Oltean wrote:
> If ops->get_mm() returns a non-zero error code, we goto out_complete,
> but there, we return 0. Fix that to propagate the "ret" variable to the
> caller. If ops->get_mm() succeeds, it will always return 0.
>
> Fixes: 2b30f8291a30 ("net: ethtool: add support for MAC Merge layer")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ethtool: mm: fix get_mm() return code not propagating to user space
2023-02-06 9:49 [PATCH net-next] ethtool: mm: fix get_mm() return code not propagating to user space Vladimir Oltean
2023-02-06 12:08 ` Simon Horman
@ 2023-02-07 15:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-07 15:00 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: netdev, davem, edumazet, kuba, pabeni, mkubecek
Hello:
This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 6 Feb 2023 11:49:32 +0200 you wrote:
> If ops->get_mm() returns a non-zero error code, we goto out_complete,
> but there, we return 0. Fix that to propagate the "ret" variable to the
> caller. If ops->get_mm() succeeds, it will always return 0.
>
> Fixes: 2b30f8291a30 ("net: ethtool: add support for MAC Merge layer")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> [...]
Here is the summary with links:
- [net-next] ethtool: mm: fix get_mm() return code not propagating to user space
https://git.kernel.org/netdev/net-next/c/ca8e4cbff6d5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-07 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 9:49 [PATCH net-next] ethtool: mm: fix get_mm() return code not propagating to user space Vladimir Oltean
2023-02-06 12:08 ` Simon Horman
2023-02-07 15:00 ` patchwork-bot+netdevbpf
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.