提交 de0d9641 编写于 作者: R Roland Dreier 提交者: Linus Torvalds

[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: NRoland Dreier <roland@topspin.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 dfe7cc7e
......@@ -103,9 +103,8 @@ struct ib_fmr_pool {
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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册