From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: bharat@chelsio.com, dledford@redhat.com, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH] RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()' Date: Mon, 23 Sep 2019 21:07:46 +0200 [thread overview] Message-ID: <20190923190746.10964-1-christophe.jaillet@wanadoo.fr> (raw) We should jump to fail3 in order to undo the 'xa_insert_irq()' call. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- Not sure which Fixes tag to use because of the many refactorings in this area. So I've choosen to use none :). The issue was already there in 4a740838bf44c. This commit has renamed all labels because a new fail1 was introduced. I've not searched further. Naming of error labels should be improved. Having nowadays a fail5 between fail2 and fail3 (because fail5 was the last error handling path added) is not that readable. However, it goes beyong the purpose of this patch. Maybe, just using a fail2a, just as already done in 9f5a9632e412 (which introduced fail5) would be enough. --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index e87fc0408470..81440eaf0a00 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3381,7 +3381,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (raddr->sin_addr.s_addr == htonl(INADDR_ANY)) { err = pick_local_ipaddrs(dev, cm_id); if (err) - goto fail2; + goto fail3; } /* find a route */ @@ -3403,7 +3403,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (ipv6_addr_type(&raddr6->sin6_addr) == IPV6_ADDR_ANY) { err = pick_local_ip6addrs(dev, cm_id); if (err) - goto fail2; + goto fail3; } /* find a route */ -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: bharat@chelsio.com, dledford@redhat.com, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH] RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()' Date: Mon, 23 Sep 2019 19:07:46 +0000 [thread overview] Message-ID: <20190923190746.10964-1-christophe.jaillet@wanadoo.fr> (raw) We should jump to fail3 in order to undo the 'xa_insert_irq()' call. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- Not sure which Fixes tag to use because of the many refactorings in this area. So I've choosen to use none :). The issue was already there in 4a740838bf44c. This commit has renamed all labels because a new fail1 was introduced. I've not searched further. Naming of error labels should be improved. Having nowadays a fail5 between fail2 and fail3 (because fail5 was the last error handling path added) is not that readable. However, it goes beyong the purpose of this patch. Maybe, just using a fail2a, just as already done in 9f5a9632e412 (which introduced fail5) would be enough. --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index e87fc0408470..81440eaf0a00 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3381,7 +3381,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (raddr->sin_addr.s_addr = htonl(INADDR_ANY)) { err = pick_local_ipaddrs(dev, cm_id); if (err) - goto fail2; + goto fail3; } /* find a route */ @@ -3403,7 +3403,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (ipv6_addr_type(&raddr6->sin6_addr) = IPV6_ADDR_ANY) { err = pick_local_ip6addrs(dev, cm_id); if (err) - goto fail2; + goto fail3; } /* find a route */ -- 2.20.1
next reply other threads:[~2019-09-24 14:11 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-23 19:07 Christophe JAILLET [this message] 2019-09-23 19:07 ` [PATCH] RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()' Christophe JAILLET 2019-10-01 9:02 ` Dan Carpenter 2019-10-01 9:02 ` Dan Carpenter 2019-11-15 21:00 ` Jason Gunthorpe 2019-11-15 21:00 ` Jason Gunthorpe 2019-11-18 17:39 ` Steve Wise 2019-11-18 17:39 ` Steve Wise
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=20190923190746.10964-1-christophe.jaillet@wanadoo.fr \ --to=christophe.jaillet@wanadoo.fr \ --cc=bharat@chelsio.com \ --cc=dledford@redhat.com \ --cc=jgg@ziepe.ca \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rdma@vger.kernel.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: linkBe 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.