From: Daniel Mack Date: Mon, 20 Oct 2014 13:29:28 +0000 (+0200) Subject: util.c: degrade (valid & KDBUS_FLAG_KERNEL) to warning X-Git-Tag: upstream/0.20141102.012929utc~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84418e4f696fb0d309983bb94736f10180e20956;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git util.c: degrade (valid & KDBUS_FLAG_KERNEL) to warning Don't BUG_ON(valid & KDBUS_FLAG_KERNEL), a warning is sufficient. Signed-off-by: Daniel Mack --- diff --git a/util.c b/util.c index 344598b..56846ad 100644 --- a/util.c +++ b/util.c @@ -70,10 +70,10 @@ int kdbus_negotiate_flags(u64 flags, void __user *buf, off_t offset, u64 valid) u64 val = valid | KDBUS_FLAG_KERNEL; /* - * KDBUS_FLAG_KERNEL is reserved. Make sure it is never considered + * KDBUS_FLAG_KERNEL is reserved and will never be considered * valid by any user of this function. */ - BUG_ON(valid & KDBUS_FLAG_KERNEL); + WARN_ON_ONCE(valid & KDBUS_FLAG_KERNEL); if (copy_to_user(((u8 __user *) buf) + offset, &val, sizeof(val))) return -EFAULT;