From 84418e4f696fb0d309983bb94736f10180e20956 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 20 Oct 2014 15:29:28 +0200 Subject: [PATCH] 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 --- util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.34.1