From: Jakub Kicinski <kuba@kernel.org>
To: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
"Denis V. Lunev" <den@openvz.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH v1 net] af_unix: Add error handling in af_unix_init().
Date: Wed, 14 Dec 2022 12:55:53 -0800 [thread overview]
Message-ID: <20221214125553.4e2a5cc5@kernel.org> (raw)
In-Reply-To: <20221214092008.47330-1-kuniyu@amazon.com>
On Wed, 14 Dec 2022 18:20:08 +0900 Kuniyuki Iwashima wrote:
> static int __init af_unix_init(void)
> {
> - int i, rc = -1;
> + int i, rc;
This is just a cleanup, right? Let's skip it, it will conflict.
> BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof_field(struct sk_buff, cb));
>
> @@ -3730,20 +3730,25 @@ static int __init af_unix_init(void)
> }
>
> rc = proto_register(&unix_dgram_proto, 1);
> - if (rc != 0) {
> + if (rc) {
> pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
Should this message be updated?
> goto out;
> }
>
> rc = proto_register(&unix_stream_proto, 1);
> - if (rc != 0) {
> + if (rc) {
> pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
And this?
> - proto_unregister(&unix_dgram_proto);
> - goto out;
> + goto err_proto_register;
> }
prev parent reply other threads:[~2022-12-14 20:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 9:20 [PATCH v1 net] af_unix: Add error handling in af_unix_init() Kuniyuki Iwashima
2022-12-14 19:18 ` Alexander H Duyck
[not found] ` <20221214130131.17555240@kernel.org>
2022-12-14 22:27 ` Alexander Duyck
2022-12-14 22:36 ` Jakub Kicinski
2022-12-14 20:55 ` Jakub Kicinski [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=20221214125553.4e2a5cc5@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=den@openvz.org \
--cc=edumazet@google.com \
--cc=kuni1840@gmail.com \
--cc=kuniyu@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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.