linux-um archives
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	richard -rw- weinberger <richard.weinberger@gmail.com>,
	laijs@cn.fujitsu.com, LKML <linux-kernel@vger.kernel.org>,
	user-mode-linux-devel@lists.sourceforge.net,
	dvhart@linux.intel.com
Subject: Re: um: WARNING: at kernel/futex.c:786 __unqueue_futex
Date: Thu, 17 Mar 2011 19:38:42 +0100	[thread overview]
Message-ID: <1300387122.6315.407.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTim4hY_HJrukNjVe5RDzBj7r547BcxKRozKcQ_uE@mail.gmail.com>

Le jeudi 17 mars 2011 à 19:25 +0100, Geert Uytterhoeven a écrit :
> On Thu, Mar 17, 2011 at 19:16, Steven Rostedt <rostedt@goodmis.org> wrote:
> > On Thu, 2011-03-17 at 18:02 +0100, Eric Dumazet wrote:
> >> Le jeudi 17 mars 2011 à 12:55 -0400, Steven Rostedt a écrit :
> >> > Here, test this patch. I'm in the process of committing it now.
> >> > It will be two patches, one for the WARN_ON_SMP() change, the other for
> >> > the futex change.
> >> >
> >> > -- Steve
> >> >
> >> > diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
> >> > index c2c9ba0..25f1e9e 100644
> >> > --- a/include/asm-generic/bug.h
> >> > +++ b/include/asm-generic/bug.h
> >> > @@ -168,7 +168,7 @@ extern void warn_slowpath_null(const char *file, const int line);
> >> >  #ifdef CONFIG_SMP
> >> >  # define WARN_ON_SMP(x)                    WARN_ON(x)
> >> >  #else
> >> > -# define WARN_ON_SMP(x)                    do { } while (0)
> >> > +# define WARN_ON_SMP(x)                    ({0;})
> >> >  #endif
> >> >
> >>
> >> You meant :
> >>
> >> # define WARN_ON_SMP(x)                       ({x;})
> >>
> >> or
> >>
> >> # define WARN_ON_SMP(x)         do { } while (x, 0)
> >>
> >> ?
> >>
> >
> > Does if (do { } while (x, 0)) work?
> 

My point was that WARN_ON(X) always evaluates X once

And apparently, WARN_ON_SMP(X) doesnt evaluates X iF !SMP

This should be documented, or fixed ;)



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  parent reply	other threads:[~2011-03-17 18:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 12:25 um: WARNING: at kernel/futex.c:786 __unqueue_futex richard -rw- weinberger
2011-03-17 14:08 ` Steven Rostedt
2011-03-17 14:17   ` richard -rw- weinberger
2011-03-17 14:27   ` richard -rw- weinberger
2011-03-17 14:31     ` Steven Rostedt
2011-03-17 16:55     ` Steven Rostedt
2011-03-17 17:02       ` Eric Dumazet
2011-03-17 17:43         ` Geert Uytterhoeven
2011-03-17 18:22           ` Steven Rostedt
2011-03-17 18:32             ` Steven Rostedt
2011-03-17 18:16         ` Steven Rostedt
2011-03-17 18:25           ` Geert Uytterhoeven
2011-03-17 18:38             ` Steven Rostedt
2011-03-17 18:38             ` Eric Dumazet [this message]
2011-03-17 18:43               ` Steven Rostedt
2011-03-17 17:18       ` richard -rw- weinberger

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=1300387122.6315.407.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=dvhart@linux.intel.com \
    --cc=geert@linux-m68k.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.weinberger@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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