lkml.org 
[lkml]   [2016]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.7 041/141] i40iw: Fix double free of allocated_buffer
    Date
    4.7-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Mustafa Ismail <mustafa.ismail@intel.com>

    commit d41d0910d97f05be987d2d60de7e8685c108963b upstream.

    Memory allocated for iwqp; iwqp->allocated_buffer is freed twice in
    the create_qp error path. Correct this by having it freed only once in
    i40iw_free_qp_resources().

    Fixes: d37498417947 ("i40iw: add files for iwarp interface")

    Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 -
    1 file changed, 1 deletion(-)

    --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
    +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
    @@ -794,7 +794,6 @@ static struct ib_qp *i40iw_create_qp(str
    return &iwqp->ibqp;
    error:
    i40iw_free_qp_resources(iwdev, iwqp, qp_num);
    - kfree(mem);
    return ERR_PTR(err_code);
    }


    \
     
     \ /
      Last update: 2016-10-06 11:54    [W:6.497 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site