From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm@kvack.org
Subject: Re: [patch] mm, mempolicy: make mempolicies robust against errors
Date: Wed, 7 Mar 2012 00:30:10 -0500 [thread overview]
Message-ID: <CAHGf_=qG1Lah00fGTNENvtgacsUt1=FcMKyt+kmPG1=UD6ecNw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203062025490.24600@chino.kir.corp.google.com>
2012/3/6 David Rientjes <rientjes@google.com>:
> It's unnecessary to BUG() in situations when a mempolicy has an
> unsupported mode, it just means that a mode doesn't have complete coverage
> in all mempolicy functions -- which is an error, but not a fatal error --
> or that a bit has flipped. Regardless, it's sufficient to warn the user
> in the kernel log of the situation once and then proceed without crashing
> the system.
>
> This patch converts nearly all the BUG()'s in mm/mempolicy.c to
> WARN_ON_ONCE(1) and provides the necessary code to return successfully.
I'm sorry. I simple don't understand the purpose of this patch. every
mem policy syscalls have input check then we can't hit BUG()s in
mempolicy.c. To me, BUG() is obvious notation than WARN_ON_ONCE().
We usually use WARN_ON_ONCE() for hw drivers code. Because of, the
warn-on mean "we believe this route never reach, but we afraid there
is crazy buggy hardware".
And, now BUG() has renreachable() annotation. why don't it work?
#define BUG() \
do { \
asm volatile("ud2"); \
unreachable(); \
} while (0)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-03-07 5:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 21:43 [patch] mm, mempolicy: dummy slab_node return value for bugless kernels David Rientjes
2012-03-06 20:15 ` Rafael Aquini
2012-03-07 0:08 ` Andrew Morton
2012-03-07 0:55 ` Rafael Aquini
2012-03-07 4:25 ` David Rientjes
2012-03-07 4:29 ` [patch] mm, mempolicy: make mempolicies robust against errors David Rientjes
2012-03-07 5:30 ` KOSAKI Motohiro [this message]
2012-03-07 5:58 ` David Rientjes
2012-03-07 6:34 ` KOSAKI Motohiro
2012-03-07 6:56 ` David Rientjes
2012-03-07 16:24 ` KOSAKI Motohiro
2012-03-07 21:06 ` David Rientjes
2012-03-08 23:51 ` Andrew Morton
2012-04-26 14:58 ` Christoph Lameter
2012-03-07 11:12 ` [patch] mm, mempolicy: dummy slab_node return value for bugless kernels Glauber Costa
2012-03-07 21:04 ` David Rientjes
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='CAHGf_=qG1Lah00fGTNENvtgacsUt1=FcMKyt+kmPG1=UD6ecNw@mail.gmail.com' \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@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