Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: decrement ref count to netdev after launching mesh discovery

After launching mesh discovery in tx path, reference count was not being
decremented. This was preventing module unload.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Brian Cavagnolo and committed by
John W. Linville
5dc306f3 6d317482

+4 -2
+4 -2
net/mac80211/tx.c
··· 1307 1307 if (is_multicast_ether_addr(hdr->addr3)) 1308 1308 memcpy(hdr->addr1, hdr->addr3, ETH_ALEN); 1309 1309 else 1310 - if (mesh_nexthop_lookup(skb, osdata)) 1311 - return 0; 1310 + if (mesh_nexthop_lookup(skb, osdata)) { 1311 + dev_put(odev); 1312 + return 0; 1313 + } 1312 1314 if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0) 1313 1315 IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh, 1314 1316 fwded_frames);