Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de0d9641 authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds
Browse files

[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: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dfe7cc7e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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 */