Re: rxe panic

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

 



On Wed, Dec 25, 2019 at 12:55:35PM +0800, Frank Huang wrote:
> hi, there is a panic on rdma_rxe module when the restart
> network.service or shutdown the switch.
>
> it looks like a use-after-free error.
>
> everytime it happens, there is the log "rdma_rxe: Unknown layer 3 protocol: 0"

The error print itself is harmless.
>
> is it a known error?
>
> my kernel version is 4.14.97

Your kernel is old enough and doesn't include refcount,
so I can't say for sure that it is the case, but the
following code is not correct and with refcount debug
it will be seen immediately.

1213 int rxe_responder(void *arg)
1214 {
1215         struct rxe_qp *qp = (struct rxe_qp *)arg;
1216         struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
1217         enum resp_states state;
1218         struct rxe_pkt_info *pkt = NULL;
1219         int ret = 0;
1220
1221         rxe_add_ref(qp); <------ USE-AFTER-FREE
1222
1223         qp->resp.aeth_syndrome = AETH_ACK_UNLIMITED;
1224
1225         if (!qp->valid) {
1226                 ret = -EINVAL;
1227                 goto done;
1228         }

Thanks



[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