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/20250103160046.469363-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -3072,7 +3072,11 @@ static int ca8210_probe(struct spi_device *spi_device)
|
||||
spi_set_drvdata(priv->spi, priv);
|
||||
if (IS_ENABLED(CONFIG_IEEE802154_CA8210_DEBUGFS)) {
|
||||
cascoda_api_upstream = ca8210_test_int_driver_write;
|
||||
ca8210_test_interface_init(priv);
|
||||
ret = ca8210_test_interface_init(priv);
|
||||
if (ret) {
|
||||
dev_crit(&spi_device->dev, "ca8210_test_interface_init failed\n");
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
cascoda_api_upstream = NULL;
|
||||
}
|
||||
|
||||
@@ -684,6 +684,10 @@ void ieee802154_if_remove(struct ieee802154_sub_if_data *sdata)
|
||||
ASSERT_RTNL();
|
||||
|
||||
mutex_lock(&sdata->local->iflist_mtx);
|
||||
if (list_empty(&sdata->local->interfaces)) {
|
||||
mutex_unlock(&sdata->local->iflist_mtx);
|
||||
return;
|
||||
}
|
||||
list_del_rcu(&sdata->list);
|
||||
mutex_unlock(&sdata->local->iflist_mtx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user