From: Dan Carpenter <dan.carpenter@oracle.com>
To: Moni Shoua <monis@mellanox.com>
Cc: Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ib/rxe: double free on error
Date: Sat, 18 Jun 2016 08:40:21 +0000 [thread overview]
Message-ID: <20160618084021.GB21713@mwanda> (raw)
"goto err1" could probably be remained "goto free_pkey_tbl" since
that's what it does. This is a double free.
Fixes: 0784481b2f32 ('Add initialization for Soft RoCE driver, pools constants etc.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/infiniband/hw/rxe/rxe.c b/drivers/infiniband/hw/rxe/rxe.c
index 48c41e00..50e25b0 100644
--- a/drivers/infiniband/hw/rxe/rxe.c
+++ b/drivers/infiniband/hw/rxe/rxe.c
@@ -187,7 +187,6 @@ static int rxe_init_ports(struct rxe_dev *rxe)
port->pkey_tbl[0] = 0xffff;
if (!port->attr.gid_tbl_len) {
- kfree(port->pkey_tbl);
err = -EINVAL;
goto err1;
}
next reply other threads:[~2016-06-18 8:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 8:40 Dan Carpenter [this message]
2016-06-18 10:34 ` [patch] ib/rxe: double free on error Leon Romanovsky
[not found] ` <20160618103430.GC5408-2ukJVAZIZ/Y@public.gmane.org>
2016-06-18 11:00 ` Dan Carpenter
2016-06-18 11:03 ` Leon Romanovsky
2016-06-18 11:22 ` Leon Romanovsky
-- strict thread matches above, loose matches on Subject: below --
2017-03-08 5:21 [PATCH] IB/rxe: " Dan Carpenter
2017-03-08 6:58 ` Leon Romanovsky
[not found] ` <20170308065829.GV14379-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-08 16:42 ` Moni Shoua
2017-03-08 16:44 ` Moni Shoua
2017-03-25 1:48 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160618084021.GB21713@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=monis@mellanox.com \
--cc=sean.hefty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox