[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170516.131626.1752384449655666500.davem@davemloft.net>
Date: Tue, 16 May 2017 13:16:26 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: xiaolou4617@...il.com
Cc: andrew.hendry@...il.com, nhorman@...driver.com,
linux-x25@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: x25: fix one potential use-after-free issue
From: linzhang <xiaolou4617@...il.com>
Date: Tue, 16 May 2017 11:52:54 +0800
> return rc;
> -out_dev:
> +out_proc:
> + x25_unregister_sysctl();
> +out_sysctl:
> unregister_netdevice_notifier(&x25_dev_notifier);
> -out_sock:
> +out_dev:
> + dev_remove_pack(&x25_packet_type);
> sock_unregister(AF_X25);
> -out_proto:
> +out_sock:
> proto_unregister(&x25_proto);
> goto out;
> }
Please do not name the labels this way, retain the current convention.
And that is the label names what resources get released not the
resource that we failed to acquire.
So the first label, should be "out_sysctl:" because that is what we
are releasing.
Powered by blists - more mailing lists