On Tue, Jan 19, 2021 at 05:28:33PM +0800, Weihang Li wrote: > From: Yangyang Li <liyangyang20@xxxxxxxxxx> > > GFP_KERNEL may cause ida_alloc_range() to sleep, but the spinlock covering > this function is not allowed to sleep, so the spinlock needs to be changed > to mutex. > > As there is a certain chance of memory allocation failure, GFP_ATOMIC > is not suitable for QP allocation scenarios. > > Fixes: 71586dd20010 ("RDMA/hns: Create QP with selected QPN for bank load balance") > Signed-off-by: Yangyang Li <liyangyang20@xxxxxxxxxx> > Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx> > --- > drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- > drivers/infiniband/hw/hns/hns_roce_qp.c | 11 ++++++----- > 2 files changed, 7 insertions(+), 6 deletions(-) Applied to for-rc, thanks Jason