Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1642681

Re: [PATCH net v2] net: x25: fix one potential use-after-free issue

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH net v2] net: x25: fix one potential use-after-free issue
Date 2017-05-16 19:20 +0200
Message-ID <tHOiB-8rM-1@gated-at.bofh.it> (permalink)
References <tHBOp-lH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: linzhang <xiaolou4617@gmail.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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net v2] net: x25: fix one potential use-after-free issue linzhang <xiaolou4617@gmail.com> - 2017-05-16 06:00 +0200
  Re: [PATCH net v2] net: x25: fix one potential use-after-free issue David Miller <davem@davemloft.net> - 2017-05-16 19:20 +0200

csiph-web