On Tue, Sep 09, 2025 at 10:12:15PM +0100, Andre Carvalho wrote:
> @@ -1460,6 +1493,10 @@ static int netconsole_netdev_event(struct
> notifier_block *this,
> stopped = true;
> }
> }
> + if (nt->state == STATE_DEACTIVATED && event == NETDEV_UP) {
> + if (!strncmp(nt->np.dev_name, dev->name, IFNAMSIZ))
Don't you need to check for dev_mac here as well?
> + schedule_work(&nt->resume_wq);
I would prefer to have the enablement done inline here, instead of
scheduling a task.
It will be safer, given no one else is traversing the list and
accessing the element, given you have the target_list_lock in
netconsole_netdev_event, but, you don't have it in the resume_wq.
Given that we don't have a lock per target, target_list_lock is the
current lock protecting any simultaneous modification to the targets.