From: "Eric W. Biederman" <ebiederm@xmission.com> To: Chen Gang <gang.chen@asianux.com> Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH] include/linux/posix_acl.h: need 'return NULL' when BUG(), if neither CONFIG_BUG nor HAVE_ARCH_BUG is defined. Date: Mon, 20 May 2013 07:40:24 -0700 [thread overview] Message-ID: <97dada79-cd78-4799-8f18-ed2bf8eee508@email.android.com> (raw) In-Reply-To: <5199DBE2.5080707@asianux.com> Chen Gang <gang.chen@asianux.com> wrote: > >If neither CONFIG_BUG nor HAVE_ARCH_BUG is defined, the BUG() will >defined as empty (e.g. randconfig with MMU for arm s5pv210) > >In this case, need 'return NULL' to let upper caller knows the failure. Seriously? The correct fix it would seem is to give a useful default BUG definition. Say *NULL. Further we should never hit that code in the first place if it calls BUG. So upper callers should never get there. If it is ever possible to get there the callers need to be fixed. Eric >Signed-off-by: Chen Gang <gang.chen@asianux.com> >--- > include/linux/posix_acl.h | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h >index 7931efe..2c48d06 100644 >--- a/include/linux/posix_acl.h >+++ b/include/linux/posix_acl.h >@@ -104,6 +104,7 @@ static inline struct posix_acl **acl_by_type(struct >inode *inode, int type) > return &inode->i_default_acl; > default: > BUG(); >+ return NULL; > } > } > >-- >1.7.7.6
WARNING: multiple messages have this Message-ID (diff)
From: ebiederm@xmission.com (Eric W. Biederman) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] include/linux/posix_acl.h: need 'return NULL' when BUG(), if neither CONFIG_BUG nor HAVE_ARCH_BUG is defined. Date: Mon, 20 May 2013 07:40:24 -0700 [thread overview] Message-ID: <97dada79-cd78-4799-8f18-ed2bf8eee508@email.android.com> (raw) In-Reply-To: <5199DBE2.5080707@asianux.com> Chen Gang <gang.chen@asianux.com> wrote: > >If neither CONFIG_BUG nor HAVE_ARCH_BUG is defined, the BUG() will >defined as empty (e.g. randconfig with MMU for arm s5pv210) > >In this case, need 'return NULL' to let upper caller knows the failure. Seriously? The correct fix it would seem is to give a useful default BUG definition. Say *NULL. Further we should never hit that code in the first place if it calls BUG. So upper callers should never get there. If it is ever possible to get there the callers need to be fixed. Eric >Signed-off-by: Chen Gang <gang.chen@asianux.com> >--- > include/linux/posix_acl.h | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h >index 7931efe..2c48d06 100644 >--- a/include/linux/posix_acl.h >+++ b/include/linux/posix_acl.h >@@ -104,6 +104,7 @@ static inline struct posix_acl **acl_by_type(struct >inode *inode, int type) > return &inode->i_default_acl; > default: > BUG(); >+ return NULL; > } > } > >-- >1.7.7.6
next prev parent reply other threads:[~2013-05-20 14:40 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-05-20 8:16 [PATCH] include/linux/posix_acl.h: need 'return NULL' when BUG(), if neither CONFIG_BUG nor HAVE_ARCH_BUG is defined Chen Gang 2013-05-20 8:16 ` Chen Gang 2013-05-20 14:40 ` Eric W. Biederman [this message] 2013-05-20 14:40 ` Eric W. Biederman 2013-05-20 16:31 ` Russell King - ARM Linux 2013-05-20 16:31 ` Russell King - ARM Linux 2013-05-21 1:51 ` Chen Gang 2013-05-21 1:51 ` Chen Gang 2013-05-21 10:59 ` Russell King - ARM Linux 2013-05-21 10:59 ` Russell King - ARM Linux 2013-05-21 11:16 ` Chen Gang 2013-05-21 11:16 ` 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=97dada79-cd78-4799-8f18-ed2bf8eee508@email.android.com \ --to=ebiederm@xmission.com \ --cc=gang.chen@asianux.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.