On 21.10.2026 23:59:17, Oliver Hartkopp wrote:
Yes, changing the order here to
rcu_read_lock();
dev = dev_get_by_index_rcu(net, addr->can_ifindex);
if (!dev || !can_get_ml_priv(dev))
err = -ENODEV;
else if (READ_ONCE(dev->mtu) < so->ll.mtu)
err = -EINVAL;
if (!err) {
dev_hold(dev);
WRITE_ONCE(so->dev, dev);
}
rcu_read_unlock();
if (err)
goto out;
is a good hint from sashiko-bot and follows the raw_bind() concept.
@Jakub: I've sent a V6 only for this single patch 11/11 here:
Is this ok for you? I think Marc is offline and can not re-spin the PR right
now.
https://lore.kernel.org/netdev/20261021215456.119268-1-socketcan@hartkopp.net/ (local)
pw-bot: cr
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |