tree 28c21b7b7628861a735473ae7c8bf0baf588ab8f
parent dfe7cc7e816224b002f6887b2a82cba677f27344
author Roland Dreier <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:26:10 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:26:10 -0700

[PATCH] IB: Fix FMR pool crash

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 <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 infiniband/core/fmr_pool.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Index: drivers/infiniband/core/fmr_pool.c
===================================================================
--- 647dfb399217c65a74790d52a0b7c3fcbce2849b/drivers/infiniband/core/fmr_pool.c 
 (mode:100644 sha1:2e9469f189263bd56bea876cf976a7bb8fdb22e2)
+++ 28c21b7b7628861a735473ae7c8bf0baf588ab8f/drivers/infiniband/core/fmr_pool.c 
 (mode:100644 sha1:59ee001ff05b1f212fa64b08a2f35cce1a04668b)
@@ -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 bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to