lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0805061542250.25162@alien.or.mcafeemobile.com>
Date:	Tue, 6 May 2008 15:45:21 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Ulrich Drepper <drepper@...hat.com>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	netdev@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
	mtk.manpages@...il.com,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 15/18] flag parameters: NONBLOCK in timerfd_create

On Tue, 6 May 2008, Ulrich Drepper wrote:

> diff --git a/fs/timerfd.c b/fs/timerfd.c
> index c6ef5e3..75d44ef 100644
> --- a/fs/timerfd.c
> +++ b/fs/timerfd.c
> @@ -184,7 +184,7 @@ asmlinkage long sys_timerfd_create(int clockid, int flags)
>  	int ufd;
>  	struct timerfd_ctx *ctx;
>  
> -	if (flags & ~TFD_CLOEXEC)
> +	if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK))
>  		return -EINVAL;
>  	if (clockid != CLOCK_MONOTONIC &&
>  	    clockid != CLOCK_REALTIME)
> @@ -199,7 +199,7 @@ asmlinkage long sys_timerfd_create(int clockid, int flags)
>  	hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS);
>  
>  	ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx,
> -			       flags & O_CLOEXEC);
> +			       flags & (O_CLOEXEC | O_NONBLOCK));
>  	if (ufd < 0)
>  		kfree(ctx);

This is perfectly fine for me. Since the flags space for these new 
syscalls is almost empty, it makes perfect sense to just map them to the 
original O_* flags.


Acked-by: Davide Libenzi <davidel@...ilserver.org>

(for the whole serie)



- Davide


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ