Skip to content

Commit

Permalink
mac80211: Use GFP_KERNEL instead of GFP_ATOMIC when possible
Browse files Browse the repository at this point in the history
Previous memory allocations in this function already use GFP_KERNEL, so
use __dev_alloc_skb() and an explicit GFP_KERNEL instead of an implicit
GFP_ATOMIC.

This gives more opportunities of successful allocation.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/194a0e2ff00c3fae88cc9fba47431747360c8242.1645345378.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Christophe JAILLET authored and Johannes Berg committed Mar 11, 2022
1 parent 3856f1b commit 60df54f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh)

bcn = kzalloc(sizeof(*bcn) + head_len + tail_len, GFP_KERNEL);
/* need an skb for IE builders to operate on */
skb = dev_alloc_skb(max(head_len, tail_len));
skb = __dev_alloc_skb(max(head_len, tail_len), GFP_KERNEL);

if (!bcn || !skb)
goto out_free;
Expand Down

0 comments on commit 60df54f

Please sign in to comment.