netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Jarek Poplawski <jarkao2@gmail.com>,
	Mikhail Markine <markine@google.com>,
	netdev@vger.kernel.org, bonding-devel@lists.sourceforge.net,
	Petri Gynther <pgynther@google.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [Bonding-devel] [PATCH] bonding: cancel_delayed_work() -> cancel_delayed_work_sync()
Date: Thu, 17 Dec 2009 08:12:53 -0800	[thread overview]
Message-ID: <11218.1261066373@death.nxdomain.ibm.com> (raw)
In-Reply-To: <1261060259.10356.112.camel@johannes.local>

Johannes Berg <johannes@sipsolutions.net> wrote:

>On Thu, 2009-12-17 at 13:36 +0000, Jarek Poplawski wrote:
>> On Thu, Dec 17, 2009 at 02:19:46PM +0100, Johannes Berg wrote:
>> > Jarek,
>> > 
>> > Sorry to mail you directly, but I only saw your reply on gmane and
>> > didn't want to break up the threading etc.
>> > 
>> > cancel_delayed_work_sync() should be ok in this case unless the work
>> > items themselves used the rtnl,
>> 
>> Hmm, I'm not sure I get your point, but e.g. bond_mii_monitor() work
>> function can get rtnl_lock().
>
>Ok in that case you can't cancel_sync() it under rtnl. I was thinking of
>the case where it's just not ok because of other work. Sorry for the
>confusion!

	There's already logic in the monitors (bond_mii_monitor, et al)
to check a sentinel (kill_timers) and do nothing (not acquire rtnl) and
return.

	What exactly is the nature of the race that doing cancel..sync
is fixing?  The bond_close function sets kill_timers prior to calling
the cancel functions, so the monitor function might run once, but it
should do nothing.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

  reply	other threads:[~2009-12-17 16:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17  0:28 [PATCH] bonding: cancel_delayed_work() -> cancel_delayed_work_sync() Mikhail Markine
2009-12-17  7:49 ` Jarek Poplawski
2009-12-17 13:36   ` Jarek Poplawski
2009-12-17 14:30     ` Johannes Berg
2009-12-17 16:12       ` Jay Vosburgh [this message]
2009-12-17 18:40         ` [Bonding-devel] " Jarek Poplawski
2009-12-17 18:49           ` Laurent Chavey
2009-12-17 19:37             ` Jay Vosburgh
2009-12-17 20:56               ` Jarek Poplawski
2009-12-17 21:16                 ` Jarek Poplawski
2009-12-17 21:40                 ` Jay Vosburgh
2009-12-17 21:58                   ` Jarek Poplawski
2009-12-17 22:33                     ` Jarek Poplawski
2009-12-17 21:25               ` Laurent Chavey
2009-12-17 21:31         ` Mikhail Markine

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=11218.1261066373@death.nxdomain.ibm.com \
    --to=fubar@us.ibm.com \
    --cc=bonding-devel@lists.sourceforge.net \
    --cc=davem@davemloft.net \
    --cc=jarkao2@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=markine@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pgynther@google.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;
as well as URLs for NNTP newsgroup(s).