Re: [PATCH] Revised fix for download corruption

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 5 Nov 2002 01:38:19 +0100

Right.. neither of our patches is complete.

  - Yours only addresses the big window while a swapin file is beeing
opened, not the successive windows on each actual read operation.

  - Mine has a filedescriptor leak due to missing cbdata fail path in
aioOpen(), and alsy might cause new bugs to pop up in the store
client due to unexpected cancellation callbacks of the pending read
operation.. (timing thing.. I cancel things too early, and it is
safer to do it later when things have settled down like done in your
patch..)

From what it seems the cbdata barrier really needs to be fixed to have
this fully fixed. Until then your patch considerably decreases the
window where the overwrite may occur even if it does not completely
fix the issue.

More information will follow in a few days.

Regards
Henrik

On Monday 04 November 2002 23.57, Phil Oester wrote:
> I've seen it, and I don't believe it is right. The meat of it:
>
> - if (storeAufsSomethingPending(sio)) {
> + if (FILE_MODE(sio->mode) == O_WRONLY &&
> storeAufsSomethingPending(sio)) {
>
> Why go through the motions of opening/reading/closing when we know
> we don't need to? It's a waste of cpu/spindle time to retrieve the
> file once we know the client is no longer listening. Mark it
> closed as soon as possible, and move on to something useful.
>
> Phil Oester
>
> On Tue, Nov 05, 2002 at 08:56:58AM +1100, Robert Collins wrote:
> > Have you seen Henriks suggested alteration as well, to prevent a
> > suspected memory overwrite on async writes?
> >
> > Rob
Received on Mon Nov 04 2002 - 17:38:24 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:11:09 MST