CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Gabriel Krisman Bertazi <[email protected]>
From: kbuild test robot <[email protected]> kernel/seccomp.c:939:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h) Use BUG_ON instead of a if condition followed by BUG. Semantic patch information: This makes an effort to find cases where BUG() follows an if condition on an expression and replaces the if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. Generated by: scripts/coccinelle/misc/bugon.cocci CC: Gabriel Krisman Bertazi <[email protected]> Signed-off-by: kbuild test robot <[email protected]> --- url: https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/seccomp-Implement-syscall-isolation-based-on-memory-areas/20200601-014401 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 9cb1fd0efd195590b828b9b865421ad345a4a145 :::::: branch date: 7 hours ago :::::: commit date: 7 hours ago Please take the patch only if it's a positive warning. Thanks! seccomp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -935,8 +935,7 @@ static int __seccomp_memmap(int this_sys { struct vm_area_struct *vma = find_vma(current->mm, sd->instruction_pointer); - if (!vma) - BUG(); + BUG_ON(!vma); if (!(vma->vm_flags & VM_NOSYSCALL)) return 0; _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
