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]
Date:	Wed, 18 Mar 2009 11:25:45 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Eric Dumazet <dada1@...mosbay.com>
Cc:	Davide Libenzi <davidel@...ilserver.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Benjamin LaHaise <bcrl@...ck.org>,
	Trond Myklebust <trond.myklebust@....uio.no>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-aio <linux-aio@...ck.org>, zach.brown@...cle.com
Subject: Re: [patch] eventfd - remove fput() call from possible IRQ context (2nd rev)

Eric Dumazet <dada1@...mosbay.com> writes:


>> 	rwfd = open("rwfile", O_RDWR|O_DIRECT);		assert(rwfd != -1);
>> 	if (posix_memalign((void **)&buf, getpagesize(), SIZE) < 0) {
>> 		perror("posix_memalign");
>> 		exit(1);
>> 	}
>> 	memset(buf, 0x42, SIZE);
>> 
>> 	/* Write test. */
>> 	res = io_queue_init(1024, &io_ctx);		assert(res == 0);
>> 	io_prep_pwrite(&iocb, rwfd, buf, SIZE, 0);
>> 	io_set_eventfd(&iocb, efd);
>> 	res = io_submit(io_ctx, 1, iocbs);		assert(res == 1);
>
> yes but io_submit() is blocking. so your close(efd) will come after the release in fs/aio.c

I'm not sure why you think io_submit is blocking.  In my setup, I
preallocated the file, and the test code opens it with O_DIRECT.  So,
io_submit should return after the dio is issued, and the I/O size is
large enough that it should still be outstanding when io_submit returns.

Cheers,
Jeff
--
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