You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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. [akpm@linux-foundation.org: fix alpha] Signed-off-by: Ulrich Drepper <drepper@redhat.com> Acked-by: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk.manpages@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
510df2dd48
commit
e38b36f325
@@ -211,6 +211,10 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask,
|
||||
sigset_t sigmask;
|
||||
struct signalfd_ctx *ctx;
|
||||
|
||||
/* Check the SFD_* constants for consistency. */
|
||||
BUILD_BUG_ON(SFD_CLOEXEC != O_CLOEXEC);
|
||||
BUILD_BUG_ON(SFD_NONBLOCK != O_NONBLOCK);
|
||||
|
||||
if (flags & ~(SFD_CLOEXEC | SFD_NONBLOCK))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user