diff options
-rw-r--r-- | include/net/sctp/sctp.h | 1 | ||||
-rw-r--r-- | net/sctp/bind_addr.c | 2 | ||||
-rw-r--r-- | net/sctp/ipv6.c | 2 | ||||
-rw-r--r-- | net/sctp/protocol.c | 9 |
4 files changed, 3 insertions, 11 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 505845ddb0be..01e094c6d0ae 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -115,7 +115,6 @@ | |||
115 | * sctp/protocol.c | 115 | * sctp/protocol.c |
116 | */ | 116 | */ |
117 | extern struct sock *sctp_get_ctl_sock(void); | 117 | extern struct sock *sctp_get_ctl_sock(void); |
118 | extern void sctp_local_addr_free(struct rcu_head *head); | ||
119 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, | 118 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, |
120 | sctp_scope_t, gfp_t gfp, | 119 | sctp_scope_t, gfp_t gfp, |
121 | int flags); | 120 | int flags); |
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index faf71d179e46..3c06c87cd280 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -219,7 +219,7 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) | |||
219 | } | 219 | } |
220 | 220 | ||
221 | if (found) { | 221 | if (found) { |
222 | call_rcu(&addr->rcu, sctp_local_addr_free); | 222 | kfree_rcu(addr, rcu); |
223 | SCTP_DBG_OBJCNT_DEC(addr); | 223 | SCTP_DBG_OBJCNT_DEC(addr); |
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 865ce7ba4e14..185fe058db11 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -123,7 +123,7 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev, | |||
123 | } | 123 | } |
124 | spin_unlock_bh(&sctp_local_addr_lock); | 124 | spin_unlock_bh(&sctp_local_addr_lock); |
125 | if (found) | 125 | if (found) |
126 | call_rcu(&addr->rcu, sctp_local_addr_free); | 126 | kfree_rcu(addr, rcu); |
127 | break; | 127 | break; |
128 | } | 128 | } |
129 | 129 | ||
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index d5bf91d04f63..065d99958ced 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -230,13 +230,6 @@ static void sctp_free_local_addr_list(void) | |||
230 | } | 230 | } |
231 | } | 231 | } |
232 | 232 | ||
233 | void sctp_local_addr_free(struct rcu_head *head) | ||
234 | { | ||
235 | struct sctp_sockaddr_entry *e = container_of(head, | ||
236 | struct sctp_sockaddr_entry, rcu); | ||
237 | kfree(e); | ||
238 | } | ||
239 | |||
240 | /* Copy the local addresses which are valid for 'scope' into 'bp'. */ | 233 | /* Copy the local addresses which are valid for 'scope' into 'bp'. */ |
241 | int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, | 234 | int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, |
242 | gfp_t gfp, int copy_flags) | 235 | gfp_t gfp, int copy_flags) |
@@ -681,7 +674,7 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
681 | } | 674 | } |
682 | spin_unlock_bh(&sctp_local_addr_lock); | 675 | spin_unlock_bh(&sctp_local_addr_lock); |
683 | if (found) | 676 | if (found) |
684 | call_rcu(&addr->rcu, sctp_local_addr_free); | 677 | kfree_rcu(addr, rcu); |
685 | break; | 678 | break; |
686 | } | 679 | } |
687 | 680 | ||