diff options
author | Roland Dreier <roland@topspin.com> | 2005-04-16 18:26:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:26:10 -0400 |
commit | de0d9641c4f164009b62ecc342f9776d44e78b6a (patch) | |
tree | 28c21b7b7628861a735473ae7c8bf0baf588ab8f /drivers/infiniband | |
parent | dfe7cc7e816224b002f6887b2a82cba677f27344 (diff) |
[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 <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/fmr_pool.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c index 2e9469f18926..59ee001ff05b 100644 --- a/drivers/infiniband/core/fmr_pool.c +++ b/drivers/infiniband/core/fmr_pool.c | |||
@@ -103,9 +103,8 @@ struct ib_fmr_pool { | |||
103 | 103 | ||
104 | static inline u32 ib_fmr_hash(u64 first_page) | 104 | static inline u32 ib_fmr_hash(u64 first_page) |
105 | { | 105 | { |
106 | return jhash_2words((u32) first_page, | 106 | return jhash_2words((u32) first_page, (u32) (first_page >> 32), 0) & |
107 | (u32) (first_page >> 32), | 107 | (IB_FMR_HASH_SIZE - 1); |
108 | 0); | ||
109 | } | 108 | } |
110 | 109 | ||
111 | /* Caller must hold pool_lock */ | 110 | /* Caller must hold pool_lock */ |