lkml.org 
[lkml]   [2017]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done()
From
Date

>> 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.

Agree, I'd prefer to start with a surgical fix before moving forward.

\
 
 \ /
  Last update: 2017-06-29 10:29    [W:0.052 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site