mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
Commit 9cd4002942
(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>
This commit is contained in:
parent
2dc2f207fb
commit
cecbb63967
1 changed files with 2 additions and 2 deletions
|
@ -1316,6 +1316,8 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
|
||||||
*p = parms->next;
|
*p = parms->next;
|
||||||
parms->dead = 1;
|
parms->dead = 1;
|
||||||
write_unlock_bh(&tbl->lock);
|
write_unlock_bh(&tbl->lock);
|
||||||
|
if (parms->dev)
|
||||||
|
dev_put(parms->dev);
|
||||||
call_rcu(&parms->rcu_head, neigh_rcu_free_parms);
|
call_rcu(&parms->rcu_head, neigh_rcu_free_parms);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1326,8 +1328,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
|
||||||
|
|
||||||
void neigh_parms_destroy(struct neigh_parms *parms)
|
void neigh_parms_destroy(struct neigh_parms *parms)
|
||||||
{
|
{
|
||||||
if (parms->dev)
|
|
||||||
dev_put(parms->dev);
|
|
||||||
kfree(parms);
|
kfree(parms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue