Message ID | 20190818091044.8845-1-christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | Mainlined |
Commit | ab59ca3eb4e7059727df85eee68bda169d26c8f8 |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | RDMA/core: Fix an error handling path in 'res_get_common_doit()' | expand |
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
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,
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(-)