Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done()

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

 



On Thu, Jun 29, 2017 at 08:36:51AM +0300, Sagi Grimberg wrote:
> 
> >Just tested this patch, I wasn't able to reproduce the NULL pointer
> >dereference or any other bugs, so this fix seems safe enough to me.
> >
> >Tested-by: Andrea Righi <righi.andrea@xxxxxxxxx>
> 
> Can you test just the one liner fix below?
> 
> >>@@ -1452,7 +1452,7 @@
> >>  isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc)
> >>  {
> >>  	struct isert_conn *isert_conn = wc->qp->qp_context;
> >>-	struct ib_device *ib_dev = isert_conn->cm_id->device;
> >>+	struct ib_device *ib_dev = isert_conn->device->ib_device;
> >>  	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> >>  		isert_print_wc(wc, "login recv");

I'll test also this one-liner fix as soon as I can.

But I can say that I'm pretty sure it will work as well, because all the
previous NULL pointer dereferences that we've got in the past happened
all 100% in isert_login_recv_done(). The other cases are probably a safe
precaution, but they can't really happen.

-Andrea
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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