Commit d0de48e
Benjamin Poirier
RDMA/mlx5: reduce stack usage in mlx5_ib_ufile_hw_cleanup
JIRA: https://issues.redhat.com/browse/RHEL-72227
JIRA: https://issues.redhat.com/browse/RHEL-73520
Upstream-status: v6.16-rc5
commit b26852d
Author: Arnd Bergmann <arnd@arndb.de>
Date: Tue Jun 10 11:28:42 2025 +0200
RDMA/mlx5: reduce stack usage in mlx5_ib_ufile_hw_cleanup
This function has an array of eight mlx5_async_cmd structures, which
often fits on the stack, but depending on the configuration can
end up blowing the stack frame warning limit:
drivers/infiniband/hw/mlx5/devx.c:2670:6: error: stack frame size (1392) exceeds limit (1280) in 'mlx5_ib_ufile_hw_cleanup' [-Werror,-Wframe-larger-than]
Change this to a dynamic allocation instead. While a kmalloc()
can theoretically fail, a GFP_KERNEL allocation under a page will
block until memory has been freed up, so in the worst case, this
only adds extra time in an already constrained environment.
Fixes: 7c891a4 ("RDMA/mlx5: Add implementation for ufile_hw_cleanup device operation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250610092846.2642535-1-arnd@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Benjamin Poirier <bpoirier@redhat.com>1 parent 8bcb83d commit d0de48e
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2669 | 2669 | | |
2670 | 2670 | | |
2671 | 2671 | | |
2672 | | - | |
| 2672 | + | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | 2675 | | |
| |||
2678 | 2678 | | |
2679 | 2679 | | |
2680 | 2680 | | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
2681 | 2685 | | |
2682 | 2686 | | |
2683 | 2687 | | |
| |||
2713 | 2717 | | |
2714 | 2718 | | |
2715 | 2719 | | |
| 2720 | + | |
| 2721 | + | |
2716 | 2722 | | |
2717 | 2723 | | |
2718 | 2724 | | |
| |||
0 commit comments