[4.2.y-ckt stable] Patch "IB/IWPM: Fix a potential skb leak" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Thu Jun 9 14:37:10 UTC 2016
This is a note to let you know that I have just added a patch titled
IB/IWPM: Fix a potential skb leak
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
https://git.launchpad.net/~canonical-kernel/linux/+git/linux-stable-ckt/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt12.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 02545c1e6a931bdf03255dc804b40912306b5376 Mon Sep 17 00:00:00 2001
From: Mark Bloch <markb at mellanox.com>
Date: Fri, 6 May 2016 22:45:24 +0300
Subject: IB/IWPM: Fix a potential skb leak
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 <markb at mellanox.com>
Reviewed-by: Leon Romanovsky <leonro at mellanox.com>
Signed-off-by: Leon Romanovsky <leon at kernel.org>
Reviewed-by: Steve Wise <swise at opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford at redhat.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/infiniband/core/iwpm_util.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/iwpm_util.c
index 5fb089e..fb43a24 100644
--- 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_buff *skb, u8 nl_client, int iwpm_pid)
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;
--
2.7.4
More information about the kernel-team
mailing list