Subject: Re: rtnl_trylock() versus SCHED_FIFO lockup

From: Stephen Hemminger <[email-masked]>
Date: Sun, 9 Aug 2020 08:32:33 -0700

On Sun,  9 Aug 2020 21:49:24 +0800
Hillf Danton <[email-masked]> wrote:

> +
> +static void br_workfn(struct work_struct *w)
> +{
> +	struct br_work *brw = container_of(w, struct br_work, work);
> +
> +	rtnl_lock();
> +	brw->err = brw->set(brw->br, brw->val);
> +	if (!brw->err)
> +		netdev_state_change(brw->br->dev);
> +	rtnl_unlock();
> +
> +	brw->done = true;
> +	wake_up(&brw->waitq);
> +}

Sorry, this is unsafe.
This has the potential of running when bridge itself has been
deleted.