All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Hillf Danton <hdanton@sina.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	Network Development <netdev@vger.kernel.org>,
	Markus Elfring <Markus.Elfring@web.de>
Subject: Re: rtnl_trylock() versus SCHED_FIFO lockup
Date: Sun, 9 Aug 2020 08:32:33 -0700	[thread overview]
Message-ID: <20200809083233.00822e44@hermes.lan> (raw)
In-Reply-To: <20200809134924.12056-1-hdanton@sina.com>

On Sun,  9 Aug 2020 21:49:24 +0800
Hillf Danton <hdanton@sina.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.

      parent reply	other threads:[~2020-08-09 15:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 14:25 rtnl_trylock() versus SCHED_FIFO lockup Rasmus Villemoes
2020-08-05 23:34 ` Stephen Hemminger
2020-08-06  9:17   ` Rasmus Villemoes
2020-08-06  9:46     ` Nikolay Aleksandrov
2020-08-07  3:39       ` Stephen Hemminger
2020-08-07  8:03         ` Rasmus Villemoes
2020-08-07 15:03           ` Stephen Hemminger
     [not found]           ` <20200809134924.12056-1-hdanton@sina.com>
2020-08-09 14:12             ` Nikolay Aleksandrov
2020-08-09 14:18               ` Nikolay Aleksandrov
2020-08-09 15:32             ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200809083233.00822e44@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=Markus.Elfring@web.de \
    --cc=hdanton@sina.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=rasmus.villemoes@prevas.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.