We just found a bug today and we’ll fix it, but we have to decide if it’s
worth creating a hotfix for our customers. We’re just about to release the
product, and it has passed QA without any problems, but since it hasn’t gone
to the field, we don’t have a huge amount of bake time that would enable us
to assess it better. So, I’m looking for some advice.
The bug is that we end up executing code that looks basically like this:
IoAcquireCancelSpinLock(&oldIrql);
// stuff
IoReleaseCancelSpinLock(oldIrql);
IoCompleteRequest(CurrentIrp, IO_NO_INCREMENT);
IoReleaseCancelSpinLock(oldIrql);
Namely, IoReleaseCancelSpinLock is getting called twice.
Now of course, we’ll remove the second call for the future releases. But
does it REALLY hurt anything? If not, then we won’t do a hotfix, and if so,
then we would.
Looking at the assembly, it looks like all IoReleaseCancelSpinLock actually
does is:
IoSavedCancelCaller = NULL;
KeLowerIrql (oldIrql);
I know that calling KeLowerIrql twice with the same IRQL value won’t hurt
anything on a single-processor machine (I don’t know if it would on a
multi-pocessor, but that’s moot).
But setting IoSavedCancelCaller to NULL twice – the second one when not
protected by a higher IRQL – seems like it could be bad, but I don’t know
how that variable is really used by the system, so I’m not sure.
Does anyone have any insight into this?
We control the hardware, by the way, so I know FOR SURE that the hardware is
always a single-processor system.
Thanks for any advice in advance!