From: Alexander Aring Date: Mon, 27 Oct 2014 16:13:31 +0000 (+0100) Subject: mac802154: rx: document ieee802154_rx() context requirement X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c730c90316aa5753c6b2d3d5af40085c220e3a91;p=linux-beck.git mac802154: rx: document ieee802154_rx() context requirement This patch is similar like d20ef63d32461332958661df73e21c0ca42601b0 ("mac80211: document ieee80211_rx() context requirement"). The netif_receive_skb call requires with softirqs disabled. This patch adds a warning if softirqs are pending while calling ieee802154_rx. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c index 2851a3f7ac0b..c4df3210c5e6 100644 --- a/net/mac802154/rx.c +++ b/net/mac802154/rx.c @@ -61,6 +61,8 @@ fail: void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb) { + WARN_ON_ONCE(softirq_count() == 0); + mac802154_subif_rx(hw, skb); } EXPORT_SYMBOL(ieee802154_rx);