Thread (2 messages) flat view 2 messages, 2 authors, 2021-08-19

Re: [PATCH for-next] RDMA/rxe: Fix memory allocation while locked

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-08-19 23:25:44

On Fri, Aug 13, 2021 at 04:06:26PM -0500, Bob Pearson wrote:
rxe_mcast_add_grp_elem() in rxe_mcast.c calls rxe_alloc() while holding
spinlocks which in turn calls kzalloc(size, GFP_KERNEL) which is incorrect.
This patch replaces rxe_alloc() by rxe_alloc_locked() which uses GFP_ATOMIC.
This bug was caused by the below mentioned commit and failing to handle the
need for the atomic allocate.

Fixes: 4276fd0dddc9 ("Remove RXE_POOL_ATOMIC")
Reported-by: Dan Carpenter <redacted>
Signed-off-by: Bob Pearson <redacted>
---
 drivers/infiniband/sw/rxe/rxe_mcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-rc, thanks

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help