Attached is a preleminary Squid-2.5 patch that inforces the cbdata
barrier on aufs reads.
Quick summary: The responsibility of copying the read data into the
buffer is moved up to the storeAufsRead() layer who can correcly
verify if the swapin request has been aborted. It also adds a few
cbdata verifications to insure that aborted events is properly
ignored and a few on-free checks to avoid memory or filedescriptor
leakage.
The patch is slightly lareger than a on-liner, and needs a fair bit of
testing... but I hope I have got it correct this time.
aiops.c | 10 ++------
async_io.c | 45 +++++++++++++++++++++++++++------------
store_asyncufs.h | 8 ++++--
store_io_aufs.c | 63
+++++++++++++++++++++++++++++++++++++++----------------
4 files changed, 85 insertions(+), 41 deletions(-)
Regards
Henrik
On Tuesday 05 November 2002 01.38, Henrik Nordstrom wrote:
> 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
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:18:37 MST