lkml.org 
[lkml]   [2007]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] debug_check_no_locks_freed: fix in_range() checks

    * Oleg Nesterov <oleg@tv-sign.ru> wrote:

    > > But debug_check_no_locks_freed() seems does:
    > > const void *mem_to = mem_from + mem_len
    > > -> mem_to is the last byte of the freed range, that fits in_range
    > > lock_from = (void *)hlock->instance;
    > > -> first byte of the lock
    > > lock_to = (void *)(hlock->instance + 1);
    > > -> first byte of the next lock, not last byte of the lock that is being checked!
    > >
    > > The test is:
    > > if (!in_range(mem_from, lock_from, mem_to) &&
    > > !in_range(mem_from, lock_to, mem_to))
    > > continue;
    > > So it tests, if the first byte of the lock is in the range that is freed ->OK
    > > And if the first byte of the *next* lock is in the range that is freed
    > > -> Not OK.

    thanks, applied.

    Ingo
    -
    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: 2007-11-24 13:25    [W:0.026 / U:1.012 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site