From: Ursula Braun <ubraun@linux.ibm.com>
To: YueHaibing <yuehaibing@huawei.com>,
davem@davemloft.net, kgraul@linux.ibm.com, hwippel@linux.ibm.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] net/smc: Fix error path in smc_init
Date: Tue, 14 May 2019 13:13:20 +0200 [thread overview]
Message-ID: <73b00d55-dbab-a4d0-97e9-121ce810f012@linux.ibm.com> (raw)
In-Reply-To: <20190514063921.41088-1-yuehaibing@huawei.com>
On 5/14/19 8:39 AM, YueHaibing wrote:
> If register_pernet_subsys success in smc_init,
> we should cleanup it in case any other error.
>
Thanks, looks good. Your patch will be part of our next patch
submission.
Regards, Ursula
> Fixes: 64e28b52c7a6 (net/smc: add pnet table namespace support")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> net/smc/af_smc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> index 6f869ef..7d3207f 100644
> --- a/net/smc/af_smc.c
> +++ b/net/smc/af_smc.c
> @@ -2019,7 +2019,7 @@ static int __init smc_init(void)
>
> rc = smc_pnet_init();
> if (rc)
> - return rc;
> + goto out_pernet_subsys;
>
> rc = smc_llc_init();
> if (rc) {
> @@ -2070,6 +2070,9 @@ static int __init smc_init(void)
> proto_unregister(&smc_proto);
> out_pnet:
> smc_pnet_exit();
> +out_pernet_subsys:
> + unregister_pernet_subsys(&smc_net_ops);
> +
> return rc;
> }
>
>
prev parent reply other threads:[~2019-05-14 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 6:39 YueHaibing
2019-05-14 11:13 ` Ursula Braun [this message]
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=73b00d55-dbab-a4d0-97e9-121ce810f012@linux.ibm.com \
--to=ubraun@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=hwippel@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yuehaibing@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®