diff options
author | David S. Miller <davem@davemloft.net> | 2008-01-20 19:39:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-20 23:31:42 -0500 |
commit | cecbb63967b4f36701b9412a12377e8fe006a93b (patch) | |
tree | a84deb000e8d18ef38ff063b28f3fe676f1dfaa3 /net | |
parent | 2dc2f207fb251666d2396fe1a69272b307ecc333 (diff) |
[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
Commit 9cd40029423701c376391da59d2c6469672b4bed (Fix race between
neigh_parms_release and neightbl_fill_parms) introduced device
reference counting regressions for several people, see:
http://bugzilla.kernel.org/show_bug.cgi?id=9778
for example.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/neighbour.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index cc8a2f190acf..29b8ee4e35d6 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1316,6 +1316,8 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms) | |||
1316 | *p = parms->next; | 1316 | *p = parms->next; |
1317 | parms->dead = 1; | 1317 | parms->dead = 1; |
1318 | write_unlock_bh(&tbl->lock); | 1318 | write_unlock_bh(&tbl->lock); |
1319 | if (parms->dev) | ||
1320 | dev_put(parms->dev); | ||
1319 | call_rcu(&parms->rcu_head, neigh_rcu_free_parms); | 1321 | call_rcu(&parms->rcu_head, neigh_rcu_free_parms); |
1320 | return; | 1322 | return; |
1321 | } | 1323 | } |
@@ -1326,8 +1328,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms) | |||
1326 | 1328 | ||
1327 | void neigh_parms_destroy(struct neigh_parms *parms) | 1329 | void neigh_parms_destroy(struct neigh_parms *parms) |
1328 | { | 1330 | { |
1329 | if (parms->dev) | ||
1330 | dev_put(parms->dev); | ||
1331 | kfree(parms); | 1331 | kfree(parms); |
1332 | } | 1332 | } |
1333 | 1333 | ||