From: David Miller <davem@davemloft.net>
To: zhang.lin16@zte.com.cn
Cc: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
songliubraving@fb.com, yhs@fb.com, willemb@google.com,
edumazet@google.com, deepa.kernel@gmail.com, arnd@arndb.de,
dh.herrmann@gmail.com, gnault@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn,
jiang.xuexin@zte.com.cn
Subject: Re: [PATCH v2] sock: fix potential memory leak in proto_register()
Date: Thu, 22 Aug 2019 15:43:58 -0700 (PDT) [thread overview]
Message-ID: <20190822.154358.2175623534462502224.davem@davemloft.net> (raw)
In-Reply-To: <1566348158-43942-1-git-send-email-zhang.lin16@zte.com.cn>
From: zhanglin <zhang.lin16@zte.com.cn>
Date: Wed, 21 Aug 2019 08:42:38 +0800
> @@ -3243,18 +3245,24 @@ int proto_register(struct proto *prot, int alloc_slab)
> }
>
> mutex_lock(&proto_list_mutex);
> + if (assign_proto_idx(prot)) {
> + mutex_unlock(&proto_list_mutex);
> + goto out_free_timewait_sock_slab_name;
> + }
Propagate the error code properly please.
prev parent reply other threads:[~2019-08-22 22:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 0:42 [PATCH v2] sock: fix potential memory leak in proto_register() zhanglin
2019-08-22 22:43 ` David Miller [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=20190822.154358.2175623534462502224.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=deepa.kernel@gmail.com \
--cc=dh.herrmann@gmail.com \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=jiang.xuexin@zte.com.cn \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=wang.yi59@zte.com.cn \
--cc=willemb@google.com \
--cc=xue.zhihong@zte.com.cn \
--cc=yhs@fb.com \
--cc=zhang.lin16@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).