Re: [PATCH] raceless request_region() fix (was Re: Linux 2.6.0-test4)

insecure
2003-08-26T05:21:15Z

[de-cc'ing Linus]

On Tuesday 26 August 2003 00:59, Jeff Garzik wrote:
> Is it a race if noone cares? :)
>
> The code does
>
> if (!request_region(...))
> fail
> touch hardware
> release_region
> if (!request_region(...))
> fail
>
> If the HIGHLY UNLIKELY event of another ISA driver claiming this region
> occurs, the system continues working just fine.

Yes, this particular driver is fine. My patch just eliminate back-to-back
release_region(...)
if (!request_region(...)) fail;
pair.

I just have a feeling that if I am going to replace check_region with
request_region, I can close race window altogether.

BTW, it all started when I tried to get rid of check_region in de4x5.c.
That's a bit worse. For example:
barrier();
request_region(iobase, (lp->bus == PCI ? DE4X5_PCI_TOTAL_SIZE :
DE4X5_EISA_TOTAL_SIZE),
lp->adapter_name);
lp->rxRingSize = NUM_RX_DESC;
--
vda