Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] RDMA/core: Fix an error handling path in 'res_get_common_doit()'
@ 2019-08-18  9:10 Christophe JAILLET
  2019-10-04 17:56 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2019-08-18  9:10 UTC (permalink / raw)
  To: dledford, jgg, leon, parav, majd, markz, swise
  Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET

According to surrounding error paths, it is likely that 'goto err_get;' is
expected here. Otherwise, a call to 'rdma_restrack_put(res);' would be
missing.

Fixes: c5dfe0ea6ffa ("RDMA/nldev: Add resource tracker doit callback")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/infiniband/core/nldev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index e287b71a1cfd..03272791a5bf 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -1231,7 +1231,7 @@ static int res_get_common_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
 	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
 	if (!msg) {
 		ret = -ENOMEM;
-		goto err;
+		goto err_get;
 	}
 
 	nlh = nlmsg_put(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq,
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/core: Fix an error handling path in 'res_get_common_doit()'
  2019-08-18  9:10 [PATCH] RDMA/core: Fix an error handling path in 'res_get_common_doit()' Christophe JAILLET
@ 2019-10-04 17:56 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2019-10-04 17:56 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: dledford, leon, parav, majd, markz, swise, linux-rdma,
	linux-kernel, kernel-janitors

On Sun, Aug 18, 2019 at 11:10:44AM +0200, Christophe JAILLET wrote:
> According to surrounding error paths, it is likely that 'goto err_get;' is
> expected here. Otherwise, a call to 'rdma_restrack_put(res);' would be
> missing.
> 
> Fixes: c5dfe0ea6ffa ("RDMA/nldev: Add resource tracker doit callback")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/infiniband/core/nldev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18  9:10 [PATCH] RDMA/core: Fix an error handling path in 'res_get_common_doit()' Christophe JAILLET
2019-10-04 17:56 ` Jason Gunthorpe

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git