Re: [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-13 Thread Doug Ledford
On Mon, 2017-06-05 at 20:23 +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path > is: > post_one_send (acquire the lock by spin_lock_irqsave) >   init_send_wqe >     copy_from_user --> may sleep > > There is no flow that makes "qp->is_user" true, and copy_

Re: [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Moni Shoua
Acked-by: Moni Shoua thanks

Re: [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Leon Romanovsky
On Mon, Jun 05, 2017 at 08:23:40PM +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > post_one_send (acquire the lock by spin_lock_irqsave) > init_send_wqe > copy_from_user --> may sleep > > There is no flow that makes "qp->is_user" true, and c

[PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: post_one_send (acquire the lock by spin_lock_irqsave) init_send_wqe copy_from_user --> may sleep There is no flow that makes "qp->is_user" true, and copy_from_user may cause bug when a non-user pointer is used. So the lin