aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/6lowpan.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index f6b169439b5b..b3021f765204 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1177,11 +1177,20 @@ static void lowpan_dellink(struct net_device *dev, struct list_head *head)
1177{ 1177{
1178 struct lowpan_dev_info *lowpan_dev = lowpan_dev_info(dev); 1178 struct lowpan_dev_info *lowpan_dev = lowpan_dev_info(dev);
1179 struct net_device *real_dev = lowpan_dev->real_dev; 1179 struct net_device *real_dev = lowpan_dev->real_dev;
1180 struct lowpan_dev_record *entry; 1180 struct lowpan_dev_record *entry, *tmp;
1181 struct lowpan_dev_record *tmp; 1181 struct lowpan_fragment *frame, *tframe;
1182 1182
1183 ASSERT_RTNL(); 1183 ASSERT_RTNL();
1184 1184
1185 spin_lock(&flist_lock);
1186 list_for_each_entry_safe(frame, tframe, &lowpan_fragments, list) {
1187 del_timer(&frame->timer);
1188 list_del(&frame->list);
1189 dev_kfree_skb(frame->skb);
1190 kfree(frame);
1191 }
1192 spin_unlock(&flist_lock);
1193
1185 mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx); 1194 mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx);
1186 list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) { 1195 list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) {
1187 if (entry->ldev == dev) { 1196 if (entry->ldev == dev) {