Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp315763ybl; Tue, 7 Jan 2020 20:04:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxjDMmmx9PT9U9/+Y2qYYvAwVO5voarH45pWPOJv+SOll5n8uOlA8t4SQ3kqsjIvfSeFYKS X-Received: by 2002:a9d:1b26:: with SMTP id l35mr2741067otl.307.1578456257645; Tue, 07 Jan 2020 20:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578456257; cv=none; d=google.com; s=arc-20160816; b=n+EuuxeZXShlKRIWtTI0O1S0QJS/cNJ9e9gs1ESIi/YqlnO35S7TtMLUc+rdiMnAmd cem2nVz13uqH8kGbvY/zhrsbSkOD5RCfHcAR5TNjVMRokx94YX/W9ZYLkf7o9AKtsjm2 5ntfT5/WTPaehCAC5VXAa3KOVfjLwWeDMeSsY9GLq28kYruGK2DsjXDeDEYeaYwo0LTL k/4ey+yIUScAuTegFXW+D1fHk0FwHnzzRGmfd8TRQWZBFS9ZqEGGAQYMETht580cRQrY AV9jfoLkfoi16ubXofZCjBgsNwhJtpCA66iqV/o1tJIkUMIw+iq0+TPBNhJBHr4kMi7g P1Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=x/gX4m6/FfrUjOLQDJinNO+8Gn8Dy3t10cTPU0lFz5c=; b=Y3b6ua7AQ9Ch/KubzI+DS1rwO7eu39Oqxspyt4tj13gZ/7UKn9SdGcXxDKztIguUrN gYWnEYUXyHf2VmWd2LUfXan/04gkV7W+9A3u309DEi8CokN7HMZahC3n0bXNUUz3kPtx MkYWbloFoU3yB4mM3K4Ohb2ljDxFiRh1LzMFuzD6bEOFmZPRdqS7q6C+IxIxUVbIvixa 6gc0xJbWFlRoMMbtTs9qeCxUFPAsuFX9eEZ2vOPXR4OS4b1Nu4eQPK0XvBtI29QgYKBi O+TLKR70fxOuc5vERfNu43nWkrfwqQYFTJcN1RSqNrY1DJoVaagJNorCvzm2dYo48tIE ZUAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si1123377otp.184.2020.01.07.20.03.53; Tue, 07 Jan 2020 20:04:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726145AbgAHEDt (ORCPT + 99 others); Tue, 7 Jan 2020 23:03:49 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:41662 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725908AbgAHEDs (ORCPT ); Tue, 7 Jan 2020 23:03:48 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 579E4F99BDD60A28DFBC; Wed, 8 Jan 2020 12:03:46 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Wed, 8 Jan 2020 12:03:36 +0800 From: Wei Yongjun To: Marcel Holtmann , Johan Hedberg , Balakrishna Godavarthi CC: Wei Yongjun , , Subject: [PATCH -next] Bluetooth: hci_qca: Use vfree() instead of kfree() Date: Wed, 8 Jan 2020 03:59:31 +0000 Message-ID: <20200108035931.51209-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Use vfree() instead of kfree() to free vmalloc() allocated data. Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Wei Yongjun --- drivers/bluetooth/hci_qca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 9392cc7f9908..a17260641283 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -529,7 +529,7 @@ static void hci_memdump_timeout(struct timer_list *t) bt_dev_err(hu->hdev, "clearing allocated memory due to memdump timeout"); /* Inject hw error event to reset the device and driver. */ hci_reset_dev(hu->hdev); - kfree(memdump_buf); + vfree(memdump_buf); kfree(qca_memdump); qca->memdump_state = QCA_MEMDUMP_TIMEOUT; del_timer(&qca->memdump_timer); @@ -1437,7 +1437,7 @@ static void qca_wait_for_dump_collection(struct hci_dev *hdev) bt_dev_err(hu->hdev, "Clearing the buffers due to timeout"); if (qca_memdump) memdump_buf = qca_memdump->memdump_buf_tail; - kfree(memdump_buf); + vfree(memdump_buf); kfree(qca_memdump); qca->memdump_state = QCA_MEMDUMP_TIMEOUT; del_timer(&qca->memdump_timer);