[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200809083233.00822e44@hermes.lan>
Date: Sun, 9 Aug 2020 08:32:33 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Hillf Danton <hdanton@...a.com>
Cc: Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
Network Development <netdev@...r.kernel.org>,
Markus Elfring <Markus.Elfring@....de>
Subject: Re: rtnl_trylock() versus SCHED_FIFO lockup
On Sun, 9 Aug 2020 21:49:24 +0800
Hillf Danton <hdanton@...a.com> 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.
Powered by blists - more mailing lists