* [PATCH] SCTP: Remove the proc fs entry if fail to set up proc fs
@ 2008-06-06 7:39 Wei Yongjun
2008-06-06 11:06 ` [PATCH] SCTP: Remove the proc fs entry if fail to set up proc Neil Horman
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2008-06-06 7:39 UTC (permalink / raw)
To: linux-sctp
This patch remove the proc fs entry which has been created if fail to
set up proc fs entry for the SCTP protocol.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
--- a/net/sctp/protocol.c 2008-05-31 23:49:24.000000000 -0400
+++ b/net/sctp/protocol.c 2008-06-01 04:35:40.000000000 -0400
@@ -108,14 +108,23 @@ static __init int sctp_proc_init(void)
}
if (sctp_snmp_proc_init())
- goto out_nomem;
+ goto err_snmp_proc_init;
if (sctp_eps_proc_init())
- goto out_nomem;
+ goto err_eps_proc_init;
if (sctp_assocs_proc_init())
- goto out_nomem;
+ goto err_assocs_proc_init;
return 0;
+err_assocs_proc_init:
+ sctp_eps_proc_exit();
+err_eps_proc_init:
+ sctp_snmp_proc_exit();
+err_snmp_proc_init:
+ if (proc_net_sctp) {
+ proc_net_sctp = NULL;
+ remove_proc_entry("sctp", init_net.proc_net);
+ }
out_nomem:
return -ENOMEM;
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] SCTP: Remove the proc fs entry if fail to set up proc
2008-06-06 7:39 [PATCH] SCTP: Remove the proc fs entry if fail to set up proc fs Wei Yongjun
@ 2008-06-06 11:06 ` Neil Horman
0 siblings, 0 replies; 2+ messages in thread
From: Neil Horman @ 2008-06-06 11:06 UTC (permalink / raw)
To: linux-sctp
On Fri, Jun 06, 2008 at 03:39:27PM +0800, Wei Yongjun wrote:
> This patch remove the proc fs entry which has been created if fail to
> set up proc fs entry for the SCTP protocol.
>
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>
> --- a/net/sctp/protocol.c 2008-05-31 23:49:24.000000000 -0400
> +++ b/net/sctp/protocol.c 2008-06-01 04:35:40.000000000 -0400
> @@ -108,14 +108,23 @@ static __init int sctp_proc_init(void)
> }
>
> if (sctp_snmp_proc_init())
> - goto out_nomem;
> + goto err_snmp_proc_init;
> if (sctp_eps_proc_init())
> - goto out_nomem;
> + goto err_eps_proc_init;
> if (sctp_assocs_proc_init())
> - goto out_nomem;
> + goto err_assocs_proc_init;
>
> return 0;
>
> +err_assocs_proc_init:
> + sctp_eps_proc_exit();
> +err_eps_proc_init:
> + sctp_snmp_proc_exit();
> +err_snmp_proc_init:
> + if (proc_net_sctp) {
> + proc_net_sctp = NULL;
> + remove_proc_entry("sctp", init_net.proc_net);
> + }
> out_nomem:
> return -ENOMEM;
> }
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Acked-by: Neil Horman <nhorman@tuxdriver.com>
--
/****************************************************
* Neil Horman <nhorman@tuxdriver.com>
* Software Engineer, Red Hat
****************************************************/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-06 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06 7:39 [PATCH] SCTP: Remove the proc fs entry if fail to set up proc fs Wei Yongjun
2008-06-06 11:06 ` [PATCH] SCTP: Remove the proc fs entry if fail to set up proc Neil Horman
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.