diff options
author | Patrick McHardy <kaber@trash.net> | 2010-06-15 15:31:06 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-06-15 15:31:06 (GMT) |
commit | f9181f4ffc71d7b7dd1906c9a11d51d6659220ae (patch) | |
tree | 194f22e8216a1b9ee2c0dd019142202d73a7dc87 /net/phonet/pn_dev.c | |
parent | 0902b469bd25065aa0688c3cee6f11744c817e7c (diff) | |
parent | 1ab6c163dee279559e3a62d774af7e4c4c9b4c67 (diff) | |
download | linux-fsl-qoriq-f9181f4ffc71d7b7dd1906c9a11d51d6659220ae.tar.xz |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
include/net/netfilter/xt_rateest.h
net/bridge/br_netfilter.c
net/netfilter/nf_conntrack_core.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r-- | net/phonet/pn_dev.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index c33da65..b18e48f 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c @@ -162,6 +162,14 @@ int phonet_address_add(struct net_device *dev, u8 addr) return err; } +static void phonet_device_rcu_free(struct rcu_head *head) +{ + struct phonet_device *pnd; + + pnd = container_of(head, struct phonet_device, rcu); + kfree(pnd); +} + int phonet_address_del(struct net_device *dev, u8 addr) { struct phonet_device_list *pndevs = phonet_device_list(dev_net(dev)); @@ -179,10 +187,9 @@ int phonet_address_del(struct net_device *dev, u8 addr) pnd = NULL; mutex_unlock(&pndevs->lock); - if (pnd) { - synchronize_rcu(); - kfree(pnd); - } + if (pnd) + call_rcu(&pnd->rcu, phonet_device_rcu_free); + return err; } |