netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>,
	David Miller <davem@davemloft.net>,
	akpm@linux-foundation.org, netdev@vger.kernel.org,
	lpiccilli@gelre.com.br, bugme-daemon@bugzilla.kernel.org
Subject: Re: [Bugme-new] [Bug 7974] New: BUG: scheduling while atomic: swapper/0x10000100/0
Date: Tue, 13 Feb 2007 15:54:46 -0800	[thread overview]
Message-ID: <20070213155446.2f423782@freekitty> (raw)
In-Reply-To: <200702132333.l1DNX022012433@death.nxdomain.ibm.com>


> >/**
> > * bond_rtnl_wrapper - take the rtnl_lock if needed
> > * @x:         function with args
> > *
> > */
> >#define RTNL_WRAPPER(x)                \
> >({                                     \
> >       int __rc__;                     \
> >       if (rtnl_trylock()) {           \
> >               __rc__ = x;             \
> >               rtnl_unlock();          \
> >       } else {                        \
> >               __rc__ = x;             \
> >       }                               \
> >       __rc__;                         \
> >})
> >
> >
> >and wrapped it around the calls to dev_set_mac_address.  I wasn't
> >pleased with it, but it seemed like it worked pretty well based on the
> >testing I did.
> 
> 	The problem with this is that it'll cause failures in the case
> that some other unrelated entity holds rtnl ("x" will be performed
> concurrently with whomever actually holds rtnl).
> 
> 	-J

It is also a crap macro.

  reply	other threads:[~2007-02-13 23:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200702091623.l19GNiUP006513@fire-2.osdl.org>
2007-02-09 21:38 ` [Bugme-new] [Bug 7974] New: BUG: scheduling while atomic: swapper/0x10000100/0 Andrew Morton
2007-02-09 22:35   ` Francois Romieu
2007-02-09 23:31     ` Michael Chan
2007-02-11 22:53     ` Herbert Xu
2007-02-13 20:29   ` Andy Gospodarek
2007-02-13 22:26     ` Jay Vosburgh
2007-02-13 22:32       ` David Miller
2007-02-13 23:08         ` Andy Gospodarek
2007-02-13 23:33           ` Jay Vosburgh
2007-02-13 23:54             ` Stephen Hemminger [this message]
2007-02-14  0:10               ` Andy Gospodarek
2007-02-14  1:31             ` Andy Gospodarek
2007-02-14  2:11               ` Jay Vosburgh
2007-02-15 21:00                 ` Andy Gospodarek
2007-02-15 23:45                   ` Jay Vosburgh
2007-02-19 21:21                     ` Andy Gospodarek

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=20070213155446.2f423782@freekitty \
    --to=shemminger@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=andy@greyhouse.net \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=lpiccilli@gelre.com.br \
    --cc=netdev@vger.kernel.org \
    /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).