[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97dada79-cd78-4799-8f18-ed2bf8eee508@email.android.com>
Date: Mon, 20 May 2013 07:40:24 -0700
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: Chen Gang <gang.chen@...anux.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.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.
Chen Gang <gang.chen@...anux.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@...anux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists