Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:61195 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689Ab1HXPxj convert rfc822-to-8bit (ORCPT ); Wed, 24 Aug 2011 11:53:39 -0400 Received: by wyg24 with SMTP id 24so942120wyg.19 for ; Wed, 24 Aug 2011 08:53:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110823194545.GF9770@tuxdriver.com> References: <4e472623.xXZaXUueNVRpfmG+%Larry.Finger@lwfinger.net> <20110823194545.GF9770@tuxdriver.com> Date: Wed, 24 Aug 2011 21:23:38 +0530 Message-ID: (sfid-20110824_175348_647583_D2D4267C) Subject: Re: [RFC/RFT] ath9k_htc: Fix memory leak From: Mohammed Shafi To: "John W. Linville" , Larry Finger Cc: lrodriguez@atheros.com, vasanth@atheros.com, senthilkumar@atheros.com, ath9k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org, rmanohar@qca.qualcomm.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, Aug 24, 2011 at 1:15 AM, John W. Linville wrote: > On Mon, Aug 15, 2011 at 05:56:33PM +0530, Mohammed Shafi wrote: >> On Sun, Aug 14, 2011 at 7:04 AM, Larry Finger wrote: >> > Kmemleak shows the following kind of memory leak for ath9k_htc: >> > >> > unreferenced object 0xffff88004542f200 (size 512): >> > ?comm "khubd", pid 977, jiffies 4317632516 (age 16855.868s) >> > ?hex dump (first 32 bytes): >> > ? ?00 00 00 0a 00 00 00 00 00 02 01 05 00 00 02 01 ?................ >> > ? ?00 00 00 00 00 00 81 38 02 00 00 00 33 33 30 30 ?.......8....3300 >> > ?backtrace: >> > ? ?[] create_object+0x127/0x2b0 >> > ? ?[] kmemleak_alloc+0x21/0x50 >> > ? ?[] __kmalloc_node_track_caller+0x153/0x220 >> > ? ?[] __alloc_skb+0x7e/0x170 >> > ? ?[] htc_connect_service+0x111/0x200 [ath9k_htc] >> > ? ?[] ath9k_init_htc_services+0x240/0x2b0 [ath9k_htc] >> > ? ?[] ath9k_htc_probe_device+0xea/0xa50 [ath9k_htc] >> > ? ?[] ath9k_htc_hw_init+0xc/0x30 [ath9k_htc] >> > ? ?[] ath9k_hif_usb_probe+0x1ca/0x420 [ath9k_htc] >> > ? ?[] usb_probe_interface+0xb9/0x160 [usbcore] >> > ? ?[] driver_probe_device+0x89/0x1a0 >> > ? ?[] __device_attach+0x4b/0x60 >> > ? ?[] bus_for_each_drv+0x64/0x90 >> > ? ?[] device_attach+0xa1/0xb0 >> > ? ?[] bus_probe_device+0x25/0x40 >> > ? ?[] device_add+0x55a/0x630 >> > >> > The device is a TP-Link TL-WN722N. The output from lsusb is "ID 0cf3:9271 >> > Atheros Communications, Inc. AR9271 802.11n". >> > >> > Signed-off-by: Larry Finger >> > Cc: Stable >> > --- >> > >> > This patch certainly fixes a leak. I'm testing to see if there are >> > others. >> >> Hi Larry, >> >> thanks for finding this. >> I remember seeing this memleaks sometime back and thought this patch >> might help(i think same as yours with some more corner cases) >> https://patchwork.kernel.org/patch/1016752/ >> but I found there were still some memory leaks, I was unsure where I >> am missing. if you are sure that this addresses the issue, we can send >> a patch. > > Ping? ?Is this the patch we want? ?Or something else? Hi John, the complete patch is posted http://www.spinics.net/lists/linux-wireless/msg75134.html Vasanth said that at some scenario's with the above patch it may cause some panics. based on the maintainers concerns/doubts lets drop this patch. myself and Larry still noticed few more memory leaks. I think we better drop this patch and fix it completely/tested. as I am with some other critical tasks we will soon address this. Larry if you have any thoughts, please share. > > John > -- > John W. Linville ? ? ? ? ? ? ? ?Someday the world will need a hero, and you > linville@tuxdriver.com ? ? ? ? ? ? ? ? ?might be all we have. ?Be ready. > -- shafi