From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: [PATCH rdma-next V2 1/5] IB/IWPM: Fix a potential skb leak
Date: Fri, 6 May 2016 22:45:24 +0300 [thread overview]
Message-ID: <1462563928-29164-2-git-send-email-leon@kernel.org> (raw)
In-Reply-To: <1462563928-29164-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
From: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
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-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
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 9b2bf2f..b65e06c 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.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-05-06 19:45 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 19:45 [PATCH rdma-next V2 0/5] Trivial fixes for 4.7 Leon Romanovsky
[not found] ` <1462563928-29164-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-05-06 19:45 ` Leon Romanovsky [this message]
2016-05-06 19:45 ` [PATCH rdma-next V2 2/5] IB/core: Remove unnecessary check in ibnl_rcv_msg Leon Romanovsky
2016-05-06 19:45 ` [PATCH rdma-next V2 3/5] IB/core: Fix a potential array overrun in CMA and SA agent Leon Romanovsky
2016-05-06 19:45 ` [PATCH rdma-next V2 4/5] IB/SA: Use correct free function Leon Romanovsky
2016-05-06 19:45 ` [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core Leon Romanovsky
[not found] ` <1462563928-29164-6-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-05-13 19:34 ` Doug Ledford
[not found] ` <ea50f1d2-6f05-66f7-18f7-0a569fd9cea5-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-15 10:51 ` Mark Bloch
[not found] ` <VI1PR05MB1391AD099C536541E79A09F9D2760-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-16 15:09 ` Doug Ledford
[not found] ` <db369e8e-7993-dfb8-d459-2c4f3d6e5b14-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-16 16:30 ` Leon Romanovsky
[not found] ` <20160516163048.GB4662-2ukJVAZIZ/Y@public.gmane.org>
2016-05-16 17:42 ` Doug Ledford
[not found] ` <298657b0-6e57-745b-5eb3-001984bffbc3-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-16 18:27 ` Jason Gunthorpe
[not found] ` <20160516182743.GF7248-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-16 18:39 ` Doug Ledford
[not found] ` <5045d314-e2f5-bda6-5583-2212335593fd-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 4:41 ` Leon Romanovsky
[not found] ` <20160518044119.GH4662-2ukJVAZIZ/Y@public.gmane.org>
2016-05-18 14:20 ` Doug Ledford
2016-05-16 18:54 ` Leon Romanovsky
[not found] ` <20160516185434.GC4662-2ukJVAZIZ/Y@public.gmane.org>
2016-05-16 20:27 ` Doug Ledford
[not found] ` <82b21da8-8bec-a7ed-fc48-b7570c0aa4ce-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-16 21:03 ` Jason Gunthorpe
[not found] ` <20160516210327.GB10945-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-17 5:00 ` Mark Bloch
[not found] ` <VI1PR05MB1391FBF91190C84744581DB8D2480-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-17 16:56 ` Jason Gunthorpe
[not found] ` <20160517165647.GB19976-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-18 15:09 ` Mark Bloch
2016-05-17 5:46 ` Christoph Hellwig
[not found] ` <20160517054652.GA17101-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-05-17 5:51 ` Leon Romanovsky
2016-05-17 14:52 ` Doug Ledford
2016-05-17 5:48 ` Leon Romanovsky
[not found] ` <20160517054834.GD4662-2ukJVAZIZ/Y@public.gmane.org>
2016-05-17 14:58 ` Doug Ledford
[not found] ` <910c3e4c-2427-34c4-cc42-f8e951c7d157-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 4:47 ` Leon Romanovsky
[not found] ` <20160518044709.GI4662-2ukJVAZIZ/Y@public.gmane.org>
2016-05-18 14:20 ` Doug Ledford
2016-05-17 8:29 ` Mark Bloch
[not found] ` <VI1PR05MB13915036338162B126E55CC2D2480-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-17 15:48 ` Doug Ledford
[not found] ` <eea7049c-5a27-1498-8e8b-674d69468fbb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 6:43 ` Mark Bloch
[not found] ` <VI1PR05MB13910C6D09E0B6B9D477B1EAD2490-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-18 14:17 ` Doug Ledford
[not found] ` <d54c2884-c2e9-8952-75f8-43147943640c-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 14:26 ` Mark Bloch
[not found] ` <VI1PR05MB1391C3E551DDAEA3ABFE71FFD2490-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-18 14:51 ` Doug Ledford
[not found] ` <0558d12b-2646-63b4-89f8-9bf4aba689db-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 17:15 ` Jason Gunthorpe
[not found] ` <20160518171536.GB15170-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-18 17:58 ` Doug Ledford
[not found] ` <fe88d9cc-3d03-030d-c4c9-360ef0ce7067-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 18:28 ` Mark Bloch
[not found] ` <VI1PR05MB1391B1C6DFE620C31A6474A0D2490-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-18 18:42 ` Doug Ledford
[not found] ` <561a675d-89d2-e675-cf83-e86ecb7519b6-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 19:36 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E22EDE332-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-23 8:58 ` Leon Romanovsky
[not found] ` <20160523085809.GF25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-23 14:05 ` Doug Ledford
[not found] ` <57430E34.3090501-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-23 14:09 ` Mark Bloch
[not found] ` <VI1PR05MB13910E30E227D4DCDBC19033D24E0-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-05-30 5:33 ` Knut Omang
[not found] ` <1464586394.13055.426.camel-6miFZF/5cTBuMpJDpNschA@public.gmane.org>
2016-05-30 6:33 ` Leon Romanovsky
[not found] ` <20160530063349.GA7477-2ukJVAZIZ/Y@public.gmane.org>
2016-05-30 11:37 ` Knut Omang
[not found] ` <1464608255.20967.27.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-05-30 12:51 ` Leon Romanovsky
2016-05-13 19:22 ` [PATCH rdma-next V2 0/5] Trivial fixes for 4.7 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=1462563928-29164-2-git-send-email-leon@kernel.org \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.