diff mbox series

[net,1/4] net/mlx5: Fix function calculation for page trees

Message ID 20210202070703.617251-2-saeed@kernel.org (mailing list archive)
State Accepted
Commit ed5e83a3c02948dad9dc4e68fb4e535baa5da630
Delegated to: Netdev Maintainers
Headers show
Series [net,1/4] net/mlx5: Fix function calculation for page trees | expand

Checks

Context Check Description
netdev/cover_letter success Pull request
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers warning 2 maintainers not CCed: linux-rdma@vger.kernel.org leon@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Saeed Mahameed Feb. 2, 2021, 7:07 a.m. UTC
From: Daniel Jurgens <danielj@nvidia.com>

The function calculation always results in a value of 0. This works
generally, but when the release all pages feature is enabled it will
result in crashes.

Fixes: 0aa128475d33 ("net/mlx5: Maintain separate page trees for ECPF and PF functions")
Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 2, 2021, 5 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Mon,  1 Feb 2021 23:07:00 -0800 you wrote:
> From: Daniel Jurgens <danielj@nvidia.com>
> 
> The function calculation always results in a value of 0. This works
> generally, but when the release all pages feature is enabled it will
> result in crashes.
> 
> Fixes: 0aa128475d33 ("net/mlx5: Maintain separate page trees for ECPF and PF functions")
> Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
> Reported-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net,1/4] net/mlx5: Fix function calculation for page trees
    https://git.kernel.org/netdev/net/c/ed5e83a3c029
  - [net,2/4] net/mlx5: Fix leak upon failure of rule creation
    https://git.kernel.org/netdev/net/c/a5bfe6b4675e
  - [net,3/4] net/mlx5e: Update max_opened_tc also when channels are closed
    https://git.kernel.org/netdev/net/c/5a2ba25a55c4
  - [net,4/4] net/mlx5e: Release skb in case of failure in tc update skb
    https://git.kernel.org/netdev/net/c/a34ffec8af8f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
index eaa8958e24d7..c0656d4782e1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
@@ -76,7 +76,7 @@  enum {
 
 static u32 get_function(u16 func_id, bool ec_function)
 {
-	return func_id & (ec_function << 16);
+	return (u32)func_id | (ec_function << 16);
 }
 
 static struct rb_root *page_root_per_function(struct mlx5_core_dev *dev, u32 function)