diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-03-02 01:46:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-03 01:27:38 -0500 |
commit | d1dd524785e30cf3d64d395d829b207376acb0aa (patch) | |
tree | 8a644aa38a2ce3b46738b41ee229aef08c9db691 /net/sctp | |
parent | 52c0326beaa3cb0049d0f1c51c6ad5d4a04e4430 (diff) |
sctp: fix crash during module unload
An extra list_del() during the module load failure and unload
resulted in a crash with a list corruption. Now sctp can
be unloaded again.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/protocol.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index b78e3be69013..4e6638449639 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -1322,9 +1322,8 @@ SCTP_STATIC __init int sctp_init(void) | |||
1322 | out: | 1322 | out: |
1323 | return status; | 1323 | return status; |
1324 | err_v6_add_protocol: | 1324 | err_v6_add_protocol: |
1325 | sctp_v6_del_protocol(); | ||
1326 | err_add_protocol: | ||
1327 | sctp_v4_del_protocol(); | 1325 | sctp_v4_del_protocol(); |
1326 | err_add_protocol: | ||
1328 | inet_ctl_sock_destroy(sctp_ctl_sock); | 1327 | inet_ctl_sock_destroy(sctp_ctl_sock); |
1329 | err_ctl_sock_init: | 1328 | err_ctl_sock_init: |
1330 | sctp_v6_protosw_exit(); | 1329 | sctp_v6_protosw_exit(); |
@@ -1335,7 +1334,6 @@ err_protosw_init: | |||
1335 | sctp_v4_pf_exit(); | 1334 | sctp_v4_pf_exit(); |
1336 | sctp_v6_pf_exit(); | 1335 | sctp_v6_pf_exit(); |
1337 | sctp_sysctl_unregister(); | 1336 | sctp_sysctl_unregister(); |
1338 | list_del(&sctp_af_inet.list); | ||
1339 | free_pages((unsigned long)sctp_port_hashtable, | 1337 | free_pages((unsigned long)sctp_port_hashtable, |
1340 | get_order(sctp_port_hashsize * | 1338 | get_order(sctp_port_hashsize * |
1341 | sizeof(struct sctp_bind_hashbucket))); | 1339 | sizeof(struct sctp_bind_hashbucket))); |
@@ -1383,7 +1381,6 @@ SCTP_STATIC __exit void sctp_exit(void) | |||
1383 | sctp_v4_pf_exit(); | 1381 | sctp_v4_pf_exit(); |
1384 | 1382 | ||
1385 | sctp_sysctl_unregister(); | 1383 | sctp_sysctl_unregister(); |
1386 | list_del(&sctp_af_inet.list); | ||
1387 | 1384 | ||
1388 | free_pages((unsigned long)sctp_assoc_hashtable, | 1385 | free_pages((unsigned long)sctp_assoc_hashtable, |
1389 | get_order(sctp_assoc_hashsize * | 1386 | get_order(sctp_assoc_hashsize * |