wifi: mac80211_hwsim: avoid calling nlmsg_free() in IRQ or IRQ disabled
authorEN-WEI WU <rickywu0421@gmail.com>
Tue, 15 Aug 2023 09:54:27 +0000 (17:54 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 22 Aug 2023 19:40:40 +0000 (21:40 +0200)
commitd40de0ad3d1b95da2b263c9361e91b984ab9c16d
tree170bfaa770c6c00abf443a99537efbad5e832977
parent927521170c4a18c620f97865f7bad48f17c48967
wifi: mac80211_hwsim: avoid calling nlmsg_free() in IRQ or IRQ disabled

The nlmsg_free() ends up calling kfree_skb(), and kfree_skb() is not allowed to be called
from hardware interrupt context or with hardware interrupts being disabled. Replace the
mistaken usage of nlmsg_free() by dev_kfree_skb_irq(), which is safe in both cases.

Signed-off-by: EN-WEI WU <enweiwu@FreeBSD.org>
Link: https://lore.kernel.org/r/20230815095427.13589-1-enweiwu@FreeBSD.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim.c