瀏覽代碼

[ATM]: Fix clip module reload crash.

net/atm/clip.c crashes the kernel if it (module) is loaded, removed,
and then loaded again.  Its exit call to neigh_table_clear()
should destroy the cache after freeing it.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap 17 年之前
父節點
當前提交
bfb85c9f75
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/core/neighbour.c

+ 3 - 0
net/core/neighbour.c

@@ -1438,6 +1438,9 @@ int neigh_table_clear(struct neigh_table *tbl)
 	free_percpu(tbl->stats);
 	free_percpu(tbl->stats);
 	tbl->stats = NULL;
 	tbl->stats = NULL;
 
 
+	kmem_cache_destroy(tbl->kmem_cachep);
+	tbl->kmem_cachep = NULL;
+
 	return 0;
 	return 0;
 }
 }