suspicion of a race in diskd

From: Robert Collins <robertc@dont-contact.us>
Date: 11 Dec 2002 21:43:57 +1100

I've found a race in diskd when the swap.state lists inaccessible files:

Object open is scheduled
Object read is scheduled
object open fails - callback occurs, and sio->callback +
sio->callback_data are cleared.
object read fails, storeDiskdIOCallback is called, and then calls the
callback (0x0) because cbdataReferenceValidDone(NULL, &foo) is true.

A simple change to if (callback && cbdataReferenceValidDone(....)) fixes
this.

I've not verified on pristine source, but tripping should be easy:
start diskd squid.
Rm /var/cache/*/*/*
browse.

I'm reworking this code anyway, which is why the quick note, not a check
on pristine source and test and commit for 2.4 + 2.5

If someone can confirm this, I'll fix up 2.4 and 2.5

Rob

Received on Wed Dec 11 2002 - 03:44:00 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:00 MST