提交 8deff4af 编写于 作者: A alex.bluesman.smirnov@gmail.com 提交者: David S. Miller

6lowpan: clean up fragments list if module unloaded

Clean all the pending fragments and relative timers if 6lowpan link
is going to be deleted.
Signed-off-by: NAlexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0848e404
......@@ -1177,11 +1177,20 @@ static void lowpan_dellink(struct net_device *dev, struct list_head *head)
{
struct lowpan_dev_info *lowpan_dev = lowpan_dev_info(dev);
struct net_device *real_dev = lowpan_dev->real_dev;
struct lowpan_dev_record *entry;
struct lowpan_dev_record *tmp;
struct lowpan_dev_record *entry, *tmp;
struct lowpan_fragment *frame, *tframe;
ASSERT_RTNL();
spin_lock(&flist_lock);
list_for_each_entry_safe(frame, tframe, &lowpan_fragments, list) {
del_timer(&frame->timer);
list_del(&frame->list);
dev_kfree_skb(frame->skb);
kfree(frame);
}
spin_unlock(&flist_lock);
mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx);
list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) {
if (entry->ldev == dev) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册