diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2004-08-13 01:13:55 -0700 |
|---|---|---|
| committer | James Morris <jmorris@redhat.com> | 2004-08-13 01:13:55 -0700 |
| commit | f2868da999e97e006dd1fa875986aee692172d55 (patch) | |
| tree | 68534d38508e4652c0c6164165716a1e5b80986e /include/linux/inetdevice.h | |
| parent | 1bffa251c91cbd6ba0c5449286a57cb9059496da (diff) | |
[IPV4]: Fix race in inetdev RCU handling.
Diffstat (limited to 'include/linux/inetdevice.h')
| -rw-r--r-- | include/linux/inetdevice.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 29d1135f1201..ec751e9fb1c2 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -158,16 +158,10 @@ __in_dev_get(const struct net_device *dev) extern void in_dev_finish_destroy(struct in_device *idev); -static inline void in_dev_rcu_destroy(struct rcu_head *head) -{ - struct in_device *idev = container_of(head, struct in_device, rcu_head); - in_dev_finish_destroy(idev); -} - static inline void in_dev_put(struct in_device *idev) { if (atomic_dec_and_test(&idev->refcnt)) - call_rcu(&idev->rcu_head, in_dev_rcu_destroy); + in_dev_finish_destroy(idev); } #define __in_dev_put(idev) atomic_dec(&(idev)->refcnt) |
