mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
flag parameters: check magic constants
This patch adds test that ensure the boundary conditions for the various constants introduced in the previous patches is met. No code is generated. [[email protected]: fix alpha] Signed-off-by: Ulrich Drepper <[email protected]> Acked-by: Davide Libenzi <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
510df2dd48
commit
e38b36f325
6 changed files with 25 additions and 0 deletions
|
|
@ -1051,6 +1051,9 @@ asmlinkage long sys_epoll_create2(int size, int flags)
|
|||
int error, fd = -1;
|
||||
struct eventpoll *ep;
|
||||
|
||||
/* Check the EPOLL_* constant for consistency. */
|
||||
BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC);
|
||||
|
||||
if (flags & ~EPOLL_CLOEXEC)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue