[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140822161502.GA30392@gmail.com>
Date: Fri, 22 Aug 2014 19:15:02 +0300
From: Dan Aloni <dan@...nelim.com>
To: Benjamin LaHaise <bcrl@...ck.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
security@...nel.org, linux-aio@...ck.org,
linux-kernel@...r.kernel.org, Mateusz Guzik <mguzik@...hat.com>,
Petr Matousek <pmatouse@...hat.com>,
Kent Overstreet <kmo@...erainc.com>,
Jeff Moyer <jmoyer@...hat.com>, stable@...r.kernel.org
Subject: Re: Revert "aio: fix aio request leak when events are reaped by user
space"
On Fri, Aug 22, 2014 at 12:01:11PM -0400, Benjamin LaHaise wrote:
> On Tue, Aug 19, 2014 at 08:46:51PM -0400, Benjamin LaHaise wrote:
> > You can trigger the behaviour with fio by using userspace event reaping.
> > Adding a test case for that behaviour to libaio would be a good idea.
>
> > I thought about how to fix this, and it isn't actually that hard. Move
> > the put_reqs_available() call back into event consumption, and then add
> > code in the submit path to call put_reqs_available() if the system runs
> > out of events by noticing that there is free space in the event ring.
> > Something along the lines below should do it (please note, this is
> > completely untested!). I'll test and polish this off tomorrow, as it's
> > getting a bit late here.
>
> Dan, does this patch work for you? It seems to pass your test program
> when I run it in a vm...
Sorry, I was waiting for a new patch from your direction, I should
have replied earlier. What bothered me about the patch you sent is that
completed_events is added as a new field but nothing assigns to it, so I
wonder how it can be effective.
--
Dan Aloni
--
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