From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753141AbcHUMKH (ORCPT ); Sun, 21 Aug 2016 08:10:07 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33754 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752546AbcHUMKE (ORCPT ); Sun, 21 Aug 2016 08:10:04 -0400 From: Frederic Dalleau Subject: Re: Memory (skb) leak in kernel 4.8-rc2 To: Marcel Holtmann , Larry Finger , "Gustavo F. Padovan" , Linux Bluetooth mailing list , LKML References: <20160820071504.GA9663@t440s.P-661HNU-F1> Message-ID: Date: Sun, 21 Aug 2016 14:09:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160820071504.GA9663@t440s.P-661HNU-F1> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel, Johan, >>> I am unable to unload module bluetooth to verify that the second >>> leak is not a false positive; however, the one in btusb is a real >>> memory leak. There was a bugzilla last week with that backtrace: https://bugzilla.kernel.org/show_bug.cgi?id=120691 At the time, I was thinking that the leak could originate from one of the req_complete_skb callback, but which one? And today that the issue has popped again, I found that hci_req_sync_complete references the skb in hdev->req_skb. It is called (via hci_req_run_skb) from either __hci_cmd_sync_ev which will pass the skb to the caller, or __hci_req_sync which leaks. I have a patch on the grill. Best Regards, Frédéric