[POWERPC] Fix array indexing error in rheap grow()
The grow() function in the rheap library allocates a larger array of blocks, copies the contents of the old blocks array to the newly allocated array and fixes the list_head pointers after the copy. At the end, the new blocks must be enqueued to the empty_list of the rh_info_t structure. This patch fixes a bug where the code was indexing past the end of the array when enqueueing blocks. The UCC ethernet driver, which uses the rheap allocator, experiences kernel panics because of this bug. Signed-off-by: NIonut Nicu <ionut.nicu@freescale.com> Signed-off-by: NTimur Tabi <timur@freescale.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
Showing
想要评论请 注册 或 登录