net: mac802154: fix WARNING in ieee802154_del_device

syzbot reported WARNING in ieee802154_del_device. The problem
was in uninitialized mutex. In case of NL802154_IFTYPE_MONITOR
mutex won't be initialized, but ieee802154_del_device() accessing it.

Signed-off-by: Pavel Skripkin <>
Change-Id: Ib473b2121da9152cd451ff9106dcbed56977ca6e
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 1cf5ac0..be8d2a0 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -599,6 +599,7 @@
 	case NL802154_IFTYPE_MONITOR:
+		mutex_init(&sdata->sec_mtx);
 		sdata->dev->needs_free_netdev = true;
 		sdata->dev->netdev_ops = &mac802154_monitor_ops;
 		wpan_dev->promiscuous_mode = true;