[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190822.154358.2175623534462502224.davem@davemloft.net>
Date: Thu, 22 Aug 2019 15:43:58 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: zhang.lin16@....com.cn
Cc: ast@...nel.org, daniel@...earbox.net, kafai@...com,
songliubraving@...com, yhs@...com, willemb@...gle.com,
edumazet@...gle.com, deepa.kernel@...il.com, arnd@...db.de,
dh.herrmann@...il.com, gnault@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
xue.zhihong@....com.cn, wang.yi59@....com.cn,
jiang.xuexin@....com.cn
Subject: Re: [PATCH v2] sock: fix potential memory leak in proto_register()
From: zhanglin <zhang.lin16@....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.
Powered by blists - more mailing lists