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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200501231231.GR23230@ZenIV.linux.org.uk>
Date:   Sat, 2 May 2020 00:12:31 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] eventfd: convert to f_op->read_iter()

On Fri, May 01, 2020 at 01:11:09PM -0600, Jens Axboe wrote:
> +	flags &= EFD_SHARED_FCNTL_FLAGS;
> +	flags |= O_RDWR;
> +	fd = get_unused_fd_flags(flags);
>  	if (fd < 0)
> -		eventfd_free_ctx(ctx);
> +		goto err;
> +
> +	file = anon_inode_getfile("[eventfd]", &eventfd_fops, ctx, flags);
> +	if (IS_ERR(file)) {
> +		put_unused_fd(fd);
> +		fd = PTR_ERR(file);
> +		goto err;
> +	}
>  
> +	file->f_mode |= FMODE_NOWAIT;
> +	fd_install(fd, file);
> +	return fd;
> +err:
> +	eventfd_free_ctx(ctx);
>  	return fd;
>  }

Looks sane...  I can take it via vfs.git, or leave it for you if you
have other stuff in the same area...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ