Thread (1 message) 1 message, 1 author, 2016-08-18
DORMANTno replies REVIEWED: 2 (0M)

2 review trailers.

[PATCH 4.4 111/138] IB/IWPM: Fix a potential skb leak

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2016-08-18 14:06:49
Also in: lkml

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Mark Bloch <redacted>

commit 5ed935e861a4cbf2158ad3386d6d26edd60d2658 upstream.

In case ibnl_put_msg fails in send_nlmsg_done,
the function returns with -ENOMEM without freeing.

This patch fixes this behavior.

Fixes: 30dc5e63d6a5 ("RDMA/core: Add support for iWARP Port Mapper user space service")
Signed-off-by: Mark Bloch <redacted>
Reviewed-by: Leon Romanovsky <redacted>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Steve Wise <redacted>
Signed-off-by: Doug Ledford <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/core/iwpm_util.c |    1 +
 1 file changed, 1 insertion(+)
--- a/drivers/infiniband/core/iwpm_util.c
+++ b/drivers/infiniband/core/iwpm_util.c
@@ -634,6 +634,7 @@ static int send_nlmsg_done(struct sk_buf
 	if (!(ibnl_put_msg(skb, &nlh, 0, 0, nl_client,
 			   RDMA_NL_IWPM_MAPINFO, NLM_F_MULTI))) {
 		pr_warn("%s Unable to put NLMSG_DONE\n", __func__);
+		dev_kfree_skb(skb);
 		return -ENOMEM;
 	}
 	nlh->nlmsg_type = NLMSG_DONE;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help