Re: [PATCH net-next 11/11] can: protect the receive lists with a per-device lock

From
Marc Kleine-Budde <mkl@pengutronix.de>
Date
2026-10-21 23:13:54
Also in
linux-can, stable
Reply to
Oliver Hartkopp, 2026-10-21
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   |

Attachments

Thread (24 messages) 24 messages, 6 authors, last reply 20d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help