vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
Subsystems (2)
PATCH 1/1 vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
The function is not called from an atomic context so use GFP_KERNEL instead of GFP_ATOMIC. The allocation of the per-CPU stats is already performed with GFP_KERNEL.
Tested using test_vxlan_vnifiltering.sh with CONFIG_DEBUG_ATOMIC_SLEEP.
--- drivers/net/vxlan/vxlan_vnifilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/vxlan/vxlan_vnifilter.c +1 -1
@@ -696,7 +696,7 @@ static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan, {struct vxlan_vni_node *vninode; - vninode =kzalloc (sizeof (*vninode),GFP_ATOMIC ); + vninode =kzalloc (sizeof (*vninode),GFP_KERNEL );if (!vninode)return NULL ; vninode->stats = netdev_alloc_pcpu_stats(struct vxlan_vni_stats_pcpu);
Signature · 1 line
2.40.1
Quoted 7 lines · Ido Schimmel
The function is not called from an atomic context so use
GFP_KERNELinstead ofGFP_ATOMIC. The allocation of the per-CPU stats is already performed withGFP_KERNEL.Tested using
test_vxlan_vnifiltering.shwithCONFIG_DEBUG_ATOMIC_SLEEP.Signed-off-by Ido Schimmel <[email protected]>
Quoted 8 lines · Ido Schimmel
The function is not called from an atomic context so use
GFP_KERNELinstead ofGFP_ATOMIC. The allocation of the per-CPU stats is already performed withGFP_KERNEL.Tested using
test_vxlan_vnifiltering.shwithCONFIG_DEBUG_ATOMIC_SLEEP.Signed-off-by Ido Schimmel <[email protected]>
Quoted 25 lines
--- drivers/net/vxlan/vxlan_vnifilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/vxlan/vxlan_vnifilter.c +1
-1@@ -696,7 +696,7 @@ static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan, {struct vxlan_vni_node *vninode; - vninode =kzalloc (sizeof (*vninode),GFP_ATOMIC ); + vninode =kzalloc (sizeof (*vninode),GFP_KERNEL );if (!vninode)return NULL ;vninode->stats = netdev_alloc_pcpu_stats(struct
vxlan_vni_stats_pcpu);
--
2.40.1
Signature · 2 lines
Regards, Kalesh A P
Quoted 16 lines · Ido Schimmel
The function is not called from an atomic context so use
GFP_KERNELinstead ofGFP_ATOMIC. The allocation of the per-CPU stats is already performed withGFP_KERNEL.Tested using
test_vxlan_vnifiltering.shwithCONFIG_DEBUG_ATOMIC_SLEEP.Signed-off-by Ido Schimmel <[email protected]>--- drivers/net/vxlan/vxlan_vnifilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/vxlan/vxlan_vnifilter.c +0
-0
drivers/net/vxlan/vxlan_vnifilter.c static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan, · line 702
Quoted 8 lines
drivers/net/vxlan/vxlan_vnifilter.c +1
-1@@ -696,7 +696,7 @@ static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan, {struct vxlan_vni_node *vninode; - vninode =kzalloc (sizeof (*vninode),GFP_ATOMIC ); + vninode =kzalloc (sizeof (*vninode),GFP_KERNEL );if (!vninode)return NULL ; vninode->stats = netdev_alloc_pcpu_stats(struct vxlan_vni_stats_pcpu);
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 21 Aug 2023 17:19:23 +0300 you wrote:
The function is not called from an atomic context so use
GFP_KERNELinstead ofGFP_ATOMIC. The allocation of the per-CPU stats is already performed withGFP_KERNEL.Tested using
test_vxlan_vnifiltering.shwithCONFIG_DEBUG_ATOMIC_SLEEP.Signed-off-by Ido Schimmel <[email protected]>[...]
Here is the summary with links:
- [net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
https://git.kernel.org/netdev/net-next/c/63c11dc2ca8b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html