From: David Rientjes <rientjes@google.com>
To: "Chen,Gang( 陈刚)" <gang.chen@asianux.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
riel@redhat.com, hughd@google.com, xemul@parallels.com,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Cyrill Gorcunov <gorcunov@gmail.com>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] mm/shmem.c: check the return value of mpol_to_str()
Date: Mon, 23 Sep 2013 14:46:12 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1309231439360.11167@chino.kir.corp.google.com> (raw)
In-Reply-To: <20130919003142.B72EC1840296@intranet.asianux.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2016 bytes --]
On Thu, 19 Sep 2013, Chen,Gang( e??a??) wrote:
> PleaseA searchA BUG_ON()A inA kernelA wideA sourceA code,A weA canA knowA whether
> itA isA commonlyA usedA orA not.
>
> PleaseA searchA BUGA inA arch/A sub-system,A weA canA knowA whichA architectures
> customizeA BUG/BUG_ON.
>
> AfterA doA theA 2A things,A InA myA opinion,A weA canA treatA BUG/BUG_ON()A isA common
> implementation,A andA mostA ofA architecturesA usesA theA defaultA one.
>
> PleaseA checkA again,A thanks.
>
BUG_ON() is used for fatal conditions where continuing could potentially
be harmful. Obviously it is commonly used in a kernel. That doesn't mean
we BUG_ON() when a string hasn't been defined for a mempolicy mode.
mpol_to_str() is not critical.
It is not a fatal condition, and nothing you say is going to convince
anybody on this thread that it's a fatal condition.
> >A That'sA absolutelyA insane.A A IfA codeA isA notA allocatingA enoughA memoryA forA theA
> >A maximumA possibleA lengthA ofA aA stringA toA beA storedA byA mpol_to_str(),A it'sA aA
> >A bugA inA theA code.A A WeA doA notA panicA andA rebootA theA user'sA machineA forA suchA aA
> >A bug.A A Instead,A weA breakA theA buildA andA requireA theA brokenA codeA toA beA fixed.
> >A
>
> PleaseA sayA inA polite.
>
You want a polite response when you're insisting that we declare absolute
failure, BUG_ON(), stop, and reboot the kernel because a mempolicy mode
isn't defined as a string in mpol_to_str()? That sounds like an impolite
response to the user, so see my politeness to you as coming from the users
of the systems you just crashed.
This is a compile-time problem, not run-time.
> CanA youA beA sure,A theA "maxlenA ==A 50"A inA "fs/proc/task_mmu()",A mustA beA aA bug??
>
I asked you to figure out the longest string possible to be stored by
mpol_to_str(). There's nothing mysterious about that function. It's
deterministic. If you really can't figure out the value this should be,
then you shouldn't be touching mpol_to_str().
next parent reply other threads:[~2013-09-23 21:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130919003142.B72EC1840296@intranet.asianux.com>
2013-09-23 21:46 ` David Rientjes [this message]
2013-09-24 2:28 ` Chen Gang
2013-09-19 0:31 Chen,Gang( 陈刚)
-- strict thread matches above, loose matches on Subject: below --
2013-08-22 1:04 [PATCH] " Chen Gang
2013-09-05 0:24 ` [PATCH v2] " Chen Gang
2013-09-09 20:30 ` David Rientjes
2013-09-10 0:47 ` Chen Gang
2013-09-10 6:43 ` David Rientjes
2013-09-10 7:01 ` Chen Gang
2013-09-12 0:33 ` David Rientjes
2013-09-12 2:19 ` KOSAKI Motohiro
2013-09-12 3:13 ` Chen Gang
2013-09-13 21:12 ` David Rientjes
2013-09-14 2:51 ` KOSAKI Motohiro
2013-09-16 3:27 ` Chen Gang
2013-09-16 20:13 ` David Rientjes
2013-09-17 0:45 ` Chen Gang
2013-09-17 22:51 ` David Rientjes
2013-09-18 1:20 ` Chen Gang
2013-09-12 3:02 ` Chen Gang
2013-09-12 18:19 ` KOSAKI Motohiro
2013-09-13 2:23 ` Chen Gang
2013-09-13 16:50 ` KOSAKI Motohiro
2013-09-16 2:55 ` Chen Gang
2013-09-16 16:16 ` KOSAKI Motohiro
2013-09-17 1:10 ` Chen Gang
2013-09-17 22:53 ` David Rientjes
2013-09-18 1:37 ` Chen Gang
2013-09-18 22:17 ` David Rientjes
2013-09-13 21:14 ` David Rientjes
2013-09-16 3:17 ` Chen Gang
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=alpine.DEB.2.02.1309231439360.11167@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=gang.chen@asianux.com \
--cc=gorcunov@gmail.com \
--cc=hughd@google.com \
--cc=kosaki.motohiro@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=riel@redhat.com \
--cc=xemul@parallels.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