diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-04-13 14:57:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-16 14:38:48 -0400 |
commit | f11bbfd87dc7c7c09e6aac7cd17c980ba64d6589 (patch) | |
tree | 6530b9da515b0171118eb58c4ce55f06d98db4a8 /drivers | |
parent | 88642088b6b82dd5da21501351df1b881943b755 (diff) |
rtlwifi: rtl8192ce: Remove false positives for kmemleak
When rtl8192ce is in operation, kmemleak indicates a number of leaks, yet
when the driver is removed all are gone. These false positives happen
in two locations:
unreferenced object 0xffff880041124000 (size 9536):
comm "work_for_cpu", pid 9295, jiffies 4295037203 (age 20596.320s)
hex dump (first 32 bytes):
33 00 00 01 01 6d 00 00 00 00 b1 0e 21 0b 00 00 3....m......!...
01 01 6d 00 00 00 00 8b 20 c0 e9 00 00 01 01 6d ..m..... ......m
backtrace:
[<ffffffff8137a1b1>] kmemleak_alloc+0x21/0x50
[<ffffffff8138d01f>] kmalloc_large_node+0x9a/0xa6
[<ffffffff811335a5>] __kmalloc_node_track_caller+0x175/0x3b0
[<ffffffff812ddfe3>] __alloc_skb+0x73/0x230
[<ffffffff812de1b8>] dev_alloc_skb+0x18/0x30
[<ffffffffa091a3b7>] rtl_pci_probe+0x10e0/0x17d2 [rtlwifi]
-- snip --
unreferenced object 0xffff8800b4d3f600 (size 256):
comm "kworker/u:2", pid 13221, jiffies 4297830173 (age 9424.568s)
hex dump (first 32 bytes):
1c d6 45 b1 00 88 ff ff 1c d6 45 b1 00 88 ff ff ..E.......E.....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8137a1b1>] kmemleak_alloc+0x21/0x50
[<ffffffff81130f43>] kmem_cache_alloc_node+0x153/0x270
[<ffffffff812ddfb6>] __alloc_skb+0x46/0x230
[<ffffffff812de1b8>] dev_alloc_skb+0x18/0x30
[<ffffffffa093264a>] rtl92c_set_fw_rsvdpagepkt+0x22a/0x5c0 [rtl8192c_common]
-- snip --
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 288b035a3579..81d0c9b34328 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "ps.h" | 34 | #include "ps.h" |
35 | #include "efuse.h" | 35 | #include "efuse.h" |
36 | #include <linux/export.h> | 36 | #include <linux/export.h> |
37 | #include <linux/kmemleak.h> | ||
37 | 38 | ||
38 | static const u16 pcibridge_vendors[PCI_BRIDGE_VENDOR_MAX] = { | 39 | static const u16 pcibridge_vendors[PCI_BRIDGE_VENDOR_MAX] = { |
39 | PCI_VENDOR_ID_INTEL, | 40 | PCI_VENDOR_ID_INTEL, |
@@ -1099,6 +1100,7 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) | |||
1099 | u32 bufferaddress; | 1100 | u32 bufferaddress; |
1100 | if (!skb) | 1101 | if (!skb) |
1101 | return 0; | 1102 | return 0; |
1103 | kmemleak_not_leak(skb); | ||
1102 | entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; | 1104 | entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; |
1103 | 1105 | ||
1104 | /*skb->dev = dev; */ | 1106 | /*skb->dev = dev; */ |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c index c20b3c30f62e..692c8ef5ee89 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "../rtl8192ce/def.h" | 34 | #include "../rtl8192ce/def.h" |
35 | #include "fw_common.h" | 35 | #include "fw_common.h" |
36 | #include <linux/export.h> | 36 | #include <linux/export.h> |
37 | #include <linux/kmemleak.h> | ||
37 | 38 | ||
38 | static void _rtl92c_enable_fw_download(struct ieee80211_hw *hw, bool enable) | 39 | static void _rtl92c_enable_fw_download(struct ieee80211_hw *hw, bool enable) |
39 | { | 40 | { |
@@ -776,6 +777,8 @@ void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished) | |||
776 | skb = dev_alloc_skb(totalpacketlen); | 777 | skb = dev_alloc_skb(totalpacketlen); |
777 | if (!skb) | 778 | if (!skb) |
778 | return; | 779 | return; |
780 | kmemleak_not_leak(skb); | ||
781 | |||
779 | memcpy((u8 *) skb_put(skb, totalpacketlen), | 782 | memcpy((u8 *) skb_put(skb, totalpacketlen), |
780 | &reserved_page_packet, totalpacketlen); | 783 | &reserved_page_packet, totalpacketlen); |
781 | 784 | ||