lkml.org 
[lkml]   [2005]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH][3/6] IB: Fix FMR pool crash
    Date
    From
    Mask bits correctly from jhash result in ib_fmr_hash() so that the
    computed bucket index is within our hash table. This fixes an SDP
    crash.

    Signed-off-by: Roland Dreier <roland@topspin.com>


    --- linux-export.orig/drivers/infiniband/core/fmr_pool.c 2005-03-31 19:07:05.000000000 -0800
    +++ linux-export/drivers/infiniband/core/fmr_pool.c 2005-04-01 10:08:58.240241456 -0800
    @@ -103,9 +103,8 @@

    static inline u32 ib_fmr_hash(u64 first_page)
    {
    - return jhash_2words((u32) first_page,
    - (u32) (first_page >> 32),
    - 0);
    + return jhash_2words((u32) first_page, (u32) (first_page >> 32), 0) &
    + (IB_FMR_HASH_SIZE - 1);
    }

    /* Caller must hold pool_lock */
    -
    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-04-06 13:31    [W:6.425 / U:0.276 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site