mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
11a37eb668
We currently depend on probe() calling virtio_device_ready() -
which happens after netdev
registration. Since ndo_open() can be called immediately
after register_netdev, this means there exists a race between
ndo_open() and virtio_device_ready(): the driver may start to use the
device (e.g. TX) before DRIVER_OK which violates the spec.
Fix this by switching to use register_netdevice() and protect the
virtio_device_ready() with rtnl_lock() to make sure ndo_open() can
only be called after virtio_device_ready().
Fixes:
|
||
---|---|---|
.. | ||
caif_serial.c | ||
caif_virtio.c | ||
Kconfig | ||
Makefile |