Skip to content

Commit a4faa15

Browse files
committed
Merge tag 'ieee802154-for-net-2025-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan
Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2025-01-03 Keisuke Nishimura provided a fix to check for kfifo_alloc() in the ca8210 driver. Lizhi Xu provided a fix a corrupted list, found by syzkaller, by checking local interfaces first. * tag 'ieee802154-for-net-2025-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan: mac802154: check local interfaces before deleting sdata list ieee802154: ca8210: Add missing check for kfifo_alloc() in ca8210_probe() ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents e95274d + eb09fbe commit a4faa15

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

drivers/net/ieee802154/ca8210.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3072,7 +3072,11 @@ static int ca8210_probe(struct spi_device *spi_device)
30723072
spi_set_drvdata(priv->spi, priv);
30733073
if (IS_ENABLED(CONFIG_IEEE802154_CA8210_DEBUGFS)) {
30743074
cascoda_api_upstream = ca8210_test_int_driver_write;
3075-
ca8210_test_interface_init(priv);
3075+
ret = ca8210_test_interface_init(priv);
3076+
if (ret) {
3077+
dev_crit(&spi_device->dev, "ca8210_test_interface_init failed\n");
3078+
goto error;
3079+
}
30763080
} else {
30773081
cascoda_api_upstream = NULL;
30783082
}

net/mac802154/iface.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ void ieee802154_if_remove(struct ieee802154_sub_if_data *sdata)
684684
ASSERT_RTNL();
685685

686686
mutex_lock(&sdata->local->iflist_mtx);
687+
if (list_empty(&sdata->local->interfaces)) {
688+
mutex_unlock(&sdata->local->iflist_mtx);
689+
return;
690+
}
687691
list_del_rcu(&sdata->list);
688692
mutex_unlock(&sdata->local->iflist_mtx);
689693

0 commit comments

Comments
 (0)