On 10/27/2014 12:42 PM, Alexander Aring wrote: > This patch adds a warning if the ieee80211_rx function is called from an > irq context which should never happen. do you mean hard and/or softirq here? > > Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx> > --- > net/mac802154/rx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c > index 2851a3f..c4df321 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); > + better use in_irq() or in_softirq(), see: http://lxr.free-electrons.com/source/include/linux/preempt_mask.h#L64 Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature