]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rxe: Add a runtime check in alloc_index()
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 10 Jan 2017 19:15:48 +0000 (11:15 -0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 10 Jan 2017 21:52:47 +0000 (16:52 -0500)
commit53eeb4c0d61da85c3088a9a1db8b1135c09c77a5
treeba51621bc1e85f16c12cb0ce65f68dbb72293680
parent6ad8ef44fb71fff742b499aa1a28d53e860c98aa
IB/rxe: Add a runtime check in alloc_index()

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

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>
Cc: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_pool.c