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: <20180328163526.GV30522@ZenIV.linux.org.uk>
Date:   Wed, 28 Mar 2018 17:35:26 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Christoph Hellwig <hch@....de>
Cc:     Avi Kivity <avi@...lladb.com>, linux-aio@...ck.org,
        linux-fsdevel@...r.kernel.org, netdev@...r.kernel.org,
        linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/30] aio: add delayed cancel support

On Wed, Mar 28, 2018 at 09:29:03AM +0200, Christoph Hellwig wrote:
>  static void aio_fsync_work(struct work_struct *work)
>  {
>  	struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
> +	struct aio_kiocb *iocb = container_of(req, struct aio_kiocb, fsync);
> +	struct file *file = req->file;
>  	int ret;
>  
>  	ret = vfs_fsync(req->file, req->datasync);
> -	fput(req->file);
> -	aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
> +	if (aio_complete(iocb, ret, 0, 0))
> +		fput(file);

IDGI.
	1) can aio_complete() ever return false here?
	2) do we ever have aio_kiocb that would not have an associated
struct file * that needs to be dropped on successful aio_complete()?  AFAICS,
rw, fsync and poll variants all have one, and I'm not sure what kind of
async IO *could* be done without an opened file.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ