[bug report] RDMA/rxe: Protect QP state with qp->state_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Bob Pearson,

The patch f605f26ea196: "RDMA/rxe: Protect QP state with
qp->state_lock" from Apr 4, 2023, leads to the following Smatch
static checker warning:

	drivers/infiniband/sw/rxe/rxe_qp.c:716 rxe_qp_to_attr()
	error: double unlocked '&qp->state_lock' (orig line 713)

drivers/infiniband/sw/rxe/rxe_qp.c
    705         rxe_av_to_attr(&qp->pri_av, &attr->ah_attr);
    706         rxe_av_to_attr(&qp->alt_av, &attr->alt_ah_attr);
    707 
    708         /* Applications that get this state typically spin on it.
    709          * Yield the processor
    710          */
    711         spin_lock_bh(&qp->state_lock);
    712         if (qp->attr.sq_draining) {
    713                 spin_unlock_bh(&qp->state_lock);
                             ^^^^^^
Unlock

    714                 cond_resched();
    715         }
--> 716         spin_unlock_bh(&qp->state_lock);
                     ^^^^^^
Double unlock

    717 
    718         return 0;
    719 }

regards,
dan carpenter



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux