Re: [patch 2/4] Timerfd v2 - new timerfd API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 24 Nov 2007, Michael Kerrisk wrote:

> > +asmlinkage long sys_timerfd_create(int clockid, int flags)
> >  {
> > -	int error;
> > +	int error, ufd;
> >  	struct timerfd_ctx *ctx;
> >  	struct file *file;
> >  	struct inode *inode;
> > -	struct itimerspec ktmr;
> > -
> > -	if (copy_from_user(&ktmr, utmr, sizeof(ktmr)))
> > -		return -EFAULT;
> >  
> >  	if (clockid != CLOCK_MONOTONIC &&
> >  	    clockid != CLOCK_REALTIME)
> >  		return -EINVAL;
> 
> Could I suggest here, the following placeholder addition:
> 
> 	if (flags != 0)
> 		return -EINVAL;

Make sense, will repost.


- Davide


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux