Revert "net/xen-netback: prevent UAF in xenvif_flush_hash()"
This reverts commit fcc9e6b2eb
.
This commit is contained in:
parent
312c6c6837
commit
6c30036842
1 changed files with 3 additions and 2 deletions
|
@ -95,7 +95,7 @@ static u32 xenvif_new_hash(struct xenvif *vif, const u8 *data,
|
|||
|
||||
static void xenvif_flush_hash(struct xenvif *vif)
|
||||
{
|
||||
struct xenvif_hash_cache_entry *entry, *n;
|
||||
struct xenvif_hash_cache_entry *entry;
|
||||
unsigned long flags;
|
||||
|
||||
if (xenvif_hash_cache_size == 0)
|
||||
|
@ -103,7 +103,8 @@ static void xenvif_flush_hash(struct xenvif *vif)
|
|||
|
||||
spin_lock_irqsave(&vif->hash.cache.lock, flags);
|
||||
|
||||
list_for_each_entry_safe(entry, n, &vif->hash.cache.list, link) {
|
||||
list_for_each_entry_rcu(entry, &vif->hash.cache.list, link,
|
||||
lockdep_is_held(&vif->hash.cache.lock)) {
|
||||
list_del_rcu(&entry->link);
|
||||
vif->hash.cache.count--;
|
||||
kfree_rcu(entry, rcu);
|
||||
|
|
Loading…
Reference in a new issue