lkml.org 
[lkml]   [2003]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] raceless request_region() fix (was Re: Linux 2.6.0-test4)
    Date
    [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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:48    [W:0.065 / U:30.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site