net: remove INIT_RCU_HEAD() usage
Subsystems (6)
PATCH 1/1 net: remove INIT_RCU_HEAD() usage
call_rcu() will unconditionally reinitialize RCU head anyway.
Signed-off-by Alexey Dobriyan <[email protected]>
---
net/core/drop_monitor.c | 1 - net/ipv6/sit.c | 1 - net/ipv6/xfrm6_tunnel.c | 1 - net/netlabel/netlabel_domainhash.c | 1 - net/netlabel/netlabel_unlabeled.c | 3 --- net/sctp/bind_addr.c | 1 - net/sctp/ipv6.c | 1 - net/sctp/protocol.c | 1 - 8 files changed, 10 deletions(-)
net/core/drop_monitor.c +0 -1
@@ -296,7 +296,6 @@ static int dropmon_net_event(struct notifier_block *ev_block, new_stat->dev = dev; new_stat->last_rx = jiffies; -INIT_RCU_HEAD (&new_stat->rcu);spin_lock (&trace_state_lock);list_add_rcu (&new_stat->list, &hw_stats_list);spin_unlock (&trace_state_lock);
net/ipv6/sit.c +0 -1
@@ -363,7 +363,6 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) goto out; } -INIT_RCU_HEAD (&p->rcu_head); p->next = t->prl; p->addr = a->addr; p->flags = a->flags;
net/ipv6/xfrm6_tunnel.c +0 -1
@@ -178,7 +178,6 @@ alloc_spi:if (!x6spi) goto out; -INIT_RCU_HEAD (&x6spi->rcu_head);memcpy (&x6spi->addr, saddr,sizeof (x6spi->addr)); x6spi->spi = spi;atomic_set (&x6spi->refcnt,1 );
net/netlabel/netlabel_domainhash.c +0 -1
@@ -315,7 +315,6 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, entry_old =netlbl_domhsh_search_def (entry->domain);if (entry_old ==NULL ) { entry->valid =1 ; -INIT_RCU_HEAD (&entry->rcu);if (entry->domain !=NULL ) {u32 bkt =netlbl_domhsh_hash (entry->domain);
net/netlabel/netlabel_unlabeled.c +0 -3
@@ -327,7 +327,6 @@ static int netlbl_unlhsh_add_addr4(struct netlbl_unlhsh_iface *iface, entry->list.addr = addr->s_addr & mask->s_addr; entry->list.mask = mask->s_addr; entry->list.valid =1 ; -INIT_RCU_HEAD (&entry->rcu); entry->secid = secid;spin_lock (&netlbl_unlhsh_lock);
@@ -373,7 +372,6 @@ static int netlbl_unlhsh_add_addr6(struct netlbl_unlhsh_iface *iface, entry->list.addr.s6_addr32[3 ] &= mask->s6_addr32[3 ];ipv6_addr_copy (&entry->list.mask, mask); entry->list.valid =1 ; -INIT_RCU_HEAD (&entry->rcu); entry->secid = secid;spin_lock (&netlbl_unlhsh_lock);
@@ -410,7 +408,6 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex)INIT_LIST_HEAD (&iface->addr4_list);INIT_LIST_HEAD (&iface->addr6_list); iface->valid =1 ; -INIT_RCU_HEAD (&iface->rcu);spin_lock (&netlbl_unlhsh_lock);if (ifindex >0 ) {
net/sctp/bind_addr.c +0 -1
@@ -186,7 +186,6 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, addr->valid =1 ;INIT_LIST_HEAD (&addr->list); -INIT_RCU_HEAD (&addr->rcu);/* We always hold a socket lock when calling this function, * and that acts as a writer synchronizing lock.
net/sctp/ipv6.c +0 -1
@@ -381,7 +381,6 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, addr->a.v6.sin6_scope_id = dev->ifindex; addr->valid =1 ;INIT_LIST_HEAD (&addr->list); -INIT_RCU_HEAD (&addr->rcu);list_add_tail (&addr->list, addrlist); } }
net/sctp/protocol.c +0 -1
@@ -188,7 +188,6 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist, addr->a.v4.sin_addr.s_addr = ifa->ifa_local; addr->valid =1 ;INIT_LIST_HEAD (&addr->list); -INIT_RCU_HEAD (&addr->rcu);list_add_tail (&addr->list, addrlist); } }
Quoted 1 line · Alexey Dobriyan
call_rcu()will unconditionally reinitialize RCU head anyway.
Acked-by Paul E. McKenney <[email protected]>
Quoted 113 lines
Signed-off-by Alexey Dobriyan <[email protected]>---
net/core/drop_monitor.c | 1 - net/ipv6/sit.c | 1 - net/ipv6/xfrm6_tunnel.c | 1 - net/netlabel/netlabel_domainhash.c | 1 - net/netlabel/netlabel_unlabeled.c | 3 --- net/sctp/bind_addr.c | 1 - net/sctp/ipv6.c | 1 - net/sctp/protocol.c | 1 - 8 files changed, 10 deletions(-)net/core/drop_monitor.c +0
-1@@ -296,7 +296,6 @@ static int dropmon_net_event(struct notifier_block *ev_block, new_stat->dev = dev; new_stat->last_rx = jiffies; -INIT_RCU_HEAD (&new_stat->rcu);spin_lock (&trace_state_lock);list_add_rcu (&new_stat->list, &hw_stats_list);spin_unlock (&trace_state_lock);net/ipv6/sit.c +0
-1@@ -363,7 +363,6 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) goto out; } -INIT_RCU_HEAD (&p->rcu_head); p->next = t->prl; p->addr = a->addr; p->flags = a->flags;net/ipv6/xfrm6_tunnel.c +0
-1@@ -178,7 +178,6 @@ alloc_spi:if (!x6spi) goto out; -INIT_RCU_HEAD (&x6spi->rcu_head);memcpy (&x6spi->addr, saddr,sizeof (x6spi->addr)); x6spi->spi = spi;atomic_set (&x6spi->refcnt,1 );net/netlabel/netlabel_domainhash.c +0
-1@@ -315,7 +315,6 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, entry_old =netlbl_domhsh_search_def (entry->domain);if (entry_old ==NULL ) { entry->valid =1 ; -INIT_RCU_HEAD (&entry->rcu);if (entry->domain !=NULL ) {u32 bkt =netlbl_domhsh_hash (entry->domain);net/netlabel/netlabel_unlabeled.c +0
-3@@ -327,7 +327,6 @@ static int netlbl_unlhsh_add_addr4(struct netlbl_unlhsh_iface *iface, entry->list.addr = addr->s_addr & mask->s_addr; entry->list.mask = mask->s_addr; entry->list.valid =1 ; -INIT_RCU_HEAD (&entry->rcu); entry->secid = secid;spin_lock (&netlbl_unlhsh_lock);@@ -373,7 +372,6 @@ static int netlbl_unlhsh_add_addr6(struct netlbl_unlhsh_iface *iface, entry->list.addr.s6_addr32[3 ] &= mask->s6_addr32[3 ];ipv6_addr_copy (&entry->list.mask, mask); entry->list.valid =1 ; -INIT_RCU_HEAD (&entry->rcu); entry->secid = secid;spin_lock (&netlbl_unlhsh_lock);@@ -410,7 +408,6 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex)INIT_LIST_HEAD (&iface->addr4_list);INIT_LIST_HEAD (&iface->addr6_list); iface->valid =1 ; -INIT_RCU_HEAD (&iface->rcu);spin_lock (&netlbl_unlhsh_lock);if (ifindex >0 ) {net/sctp/bind_addr.c +0
-1@@ -186,7 +186,6 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, addr->valid =1 ;INIT_LIST_HEAD (&addr->list); -INIT_RCU_HEAD (&addr->rcu);/* We always hold a socket lock when calling this function, * and that acts as a writer synchronizing lock. net/sctp/ipv6.c +0
-1@@ -381,7 +381,6 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, addr->a.v6.sin6_scope_id = dev->ifindex; addr->valid =1 ;INIT_LIST_HEAD (&addr->list); -INIT_RCU_HEAD (&addr->rcu);list_add_tail (&addr->list, addrlist); } }net/sctp/protocol.c +0
-2@@ -188,7 +188,6 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist, addr->a.v4.sin_addr.s_addr = ifa->ifa_local; addr->valid =1 ;INIT_LIST_HEAD (&addr->list); -INIT_RCU_HEAD (&addr->rcu);list_add_tail (&addr->list, addrlist); } } --To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Alexey Dobriyan <[email protected]>
Date: Fri, 12 Feb 2010 23:41:39 +0200
Quoted 3 lines
call_rcu()will unconditionally reinitialize RCU head anyway.Signed-off-by Alexey Dobriyan <[email protected]>
Applied to net-next-2.6