Skip to contentSkip to conversation

Patch "IB/rxe: Add a runtime check in alloc_index()" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Oct 5, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

IB/rxe: Add a runtime check in alloc_index()

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ib-rxe-add-a-runtime-check-in-alloc_index.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Oct 5 10:28:31 CEST 2017

From: Bart Van Assche <[email protected]>
Date: Tue, 10 Jan 2017 11:15:48 -0800
Subject: IB/rxe: Add a runtime check in alloc_index()

From: Bart Van Assche <[email protected]>

[ Upstream commit 642c7cbcaf2ffc1e27f67eda3dc47347ac5aff37 ]

Since index values equal to or above 'range' can trigger memory corruption, complain if index >= range.

---
 drivers/infiniband/sw/rxe/rxe_pool.c |    1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/sw/rxe/rxe_pool.c +1 -0
@@ -274,6 +274,7 @@ static u32 alloc_index(struct rxe_pool *
 	if (index >= range)
 		index = find_first_zero_bit(pool->table, range);
 
+	WARN_ON_ONCE(index >= range);
 	set_bit(index, pool->table);
 	pool->last = index;
 	return index + pool->min_index;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ib-rxe-add-a-runtime-check-in-alloc_index.patch queue-4.9/ib-rxe-fix-a-mr-reference-leak-in-check_rkey.patch