Re: [squid-users] Re: [PATCH] Revised fix for download corruption

From: Robert Collins <robertc@dont-contact.us>
Date: 05 Nov 2002 10:11:10 +1100

On Tue, 2002-11-05 at 09: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.

The problem is a potential race - but I haven't reviewed it in depth
myself. Henrik is saying that the memory area the request is writing
from may get freed once the request has been cancelled.

Rob

Received on Mon Nov 04 2002 - 16:11:22 MST

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