Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dbanerje@akamai.com
Cc: netdev@vger.kernel.org, nhorman@tuxdriver.com
Subject: Re: [PATCH net-next] netpoll: allow cleanup to be synchronous
Date: Wed, 17 Oct 2018 21:47:05 -0700 (PDT)	[thread overview]
Message-ID: <20181017.214705.2139316496548022085.davem@davemloft.net> (raw)
In-Reply-To: <20181012165929.20098-1-dbanerje@akamai.com>

From: Debabrata Banerjee <dbanerje@akamai.com>
Date: Fri, 12 Oct 2018 12:59:29 -0400

> @@ -826,7 +826,10 @@ static void netpoll_async_cleanup(struct work_struct *work)
>  
>  void __netpoll_free_async(struct netpoll *np)
>  {
> -	schedule_work(&np->cleanup_work);
> +	if (rtnl_is_locked())
> +		__netpoll_cleanup(np);
> +	else
> +		schedule_work(&np->cleanup_work);
>  }

rtnl_is_locked() says only that the RTNL mutex is held by someone.

It does not necessarily say that it is held by the current execution
context.

Which means you could erronesly run this synchronously when another
thread has the RTNL mutex held, not you.

I'm not applying this, sorry.

  parent reply	other threads:[~2018-10-18 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 16:59 [PATCH net-next] netpoll: allow cleanup to be synchronous Debabrata Banerjee
2018-10-12 17:27 ` Banerjee, Debabrata
2018-10-18  4:47 ` David Miller [this message]
2018-10-18 11:29   ` Neil Horman
2018-10-18 15:17     ` Banerjee, Debabrata
2018-10-18 16:59       ` Neil Horman
2018-10-18 17:47         ` Banerjee, Debabrata

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=20181017.214705.2139316496548022085.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dbanerje@akamai.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox