[lkml]   [2003]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: dpt_i2o.c memleak/incorrectness
    Bryan Andersen <> dijo:
    > >> There is something strange going on in drivers/scsi/dpt_i2o.c in both
    > >> 2.4 and 2.5. adpt_i2o_reset_hba() function allocates 4 bytes
    > >> for "status" stuff, then tries to reset controller, then
    > >> if timeout on first reset stage is reached, frees "status" and returns,
    > >> otherwise it proceeds to monitor "status" (which is modified by hardware
    > >> now, btw), and if timeout is reached, just exits.
    > >
    > > Correctly - I2O does the same thing in this case. Its just better to
    > > throw a few bytes away than risk corruption
    > Better document it in the comments or it will get "corrected" by some
    > mem leak detector. If possible try to use a static for the pointer to
    > the status block, but that may not work. Re-enterant code and multi CPU
    > situations likely won't allow for that. Also it might not be worth the
    > effort to properly determin if it is safe to use only one location.

    A device owned area, perhaps? To set up an area that can be messed around
    without proper locking will get you problems down the line.
    Dr. Horst H. von Brand User #22616
    Departamento de Informatica Fono: +56 32 654431
    Universidad Tecnica Federico Santa Maria +56 32 654239
    Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

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