Propagate error from sctp_proc_init
Subsystems (3)
PATCH 1/1 Propagate error from sctp_proc_init
The following patch makes sure that an error in sctp_proc_init() causes module initialization to fail.
Olaf
Signature · 3 lines
Olaf Kirch | The Hardware Gods hate me. [email protected] | ---------------+
net/sctp/protocol.c renamed from net/sctp/protocol.c.initfail +4 -1
@@ -1001,7 +1001,9 @@ goto err_init_mibs;/* Initialize proc fs directory. */ -sctp_proc_init (); + status =sctp_proc_init (); +if (status) + goto err_init_proc;/* Initialize object count debugging. */ sctp_dbg_objcnt_init ();
@@ -1165,6 +1167,7 @@ sizeof(struct sctp_hashbucket))); err_ahash_alloc:sctp_dbg_objcnt_exit (); +err_init_proc:sctp_proc_exit ();cleanup_sctp_mibs (); err_init_mibs:
The patch looks fine. Dave, could you apply it both 2.6 and 2.4 trees. It should apply to both of them with a little fuzz.
Thanks
Sridhar
Quoted 9 lines · Olaf Kirch
The following patch makes sure that an error in
sctp_proc_init()causes module initialization to fail.Olaf
--
Olaf Kirch | The Hardware Gods hate me.
[email protected] |
---------------+
net/sctp/protocol.c renamed from net/sctp/protocol.c.initfail +4 -1
@@ -1001,7 +1001,9 @@ goto err_init_mibs;/* Initialize proc fs directory. */ -sctp_proc_init (); + status =sctp_proc_init (); +if (status) + goto err_init_proc;/* Initialize object count debugging. */ sctp_dbg_objcnt_init ();
@@ -1165,6 +1167,7 @@ sizeof(struct sctp_hashbucket))); err_ahash_alloc:sctp_dbg_objcnt_exit (); +err_init_proc:sctp_proc_exit ();cleanup_sctp_mibs (); err_init_mibs: