Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp703460ybl; Wed, 8 Jan 2020 04:32:48 -0800 (PST) X-Google-Smtp-Source: APXvYqw6OfV+7a1itSp0r1YnA5ajq57OcvmHlo1+AzJsnbP9Z5OKy0KOGPV43byzXisS98TLw/vp X-Received: by 2002:a9d:7618:: with SMTP id k24mr3974587otl.65.1578486768429; Wed, 08 Jan 2020 04:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578486768; cv=none; d=google.com; s=arc-20160816; b=D8QVoT3Vx7qTbs6+70ZcAXtorq27LJu8w443ebkpxxibJoXpaqv7pRqiZxgsS/nqpu EHK3KL6ol2BVdjLLgOnfqMK2OFrFQvAeaNYXhsruOCDEAnQ8rzggE7XqgAw/EAGnbqJK B6jB+99EoPqeEm5EwDSrP1TfOvk655pgSK+XVyv7HrC2dgfcGVvLizuFpOIydW58jqWI UI9eC6vwY8v6veOAFOSrh/nSOvIAB25dBZ1bfnPjK9COz/lI7TvghozRXoHVx26GtiZa Oo/G7ZqJUyADfiBXChfBeKf6QOU4bAf8Sjpnp6nM3R4j82u9tGFiMa1FNrbY2rCccSWl pwVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=7BY+YDpvD+FCZPPlZGH7NQ/yH7pyhZGmScGsJHBppFg=; b=KU+Qfiyf4SaGhioj8hNoQSYUhL5/ZhsWA3/0JVBjMFzxXOqZgfmliSY3ka6o/T+6Ub mu88s4TNPJ/Y3uqDUby17txbVHXAfjnZi0RcoDwqx2vmK37vU3WOA6ddpLuLvs4K2sji cqe//WbhIMCdOTWmSK4gRl2GzQ5f5GuWpHg9gSe3qyPySc1iknYfYEWZH/3s0DLvv06B h/qJa+gMQAMU7Srcgt1PQ4PqXQhnNvGbJGZF47nTeKvvEjL9nIx4y2HG9HG+O0TSBNQt WeJzvW12ttUav6/oBruXQvPDuw8lby7DCuMYNnwVWYbfx4MFj2DUMXesxdomWUrURrKo E8bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=TcQEnChL; 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 k14si1667236oig.69.2020.01.08.04.32.19; Wed, 08 Jan 2020 04:32:48 -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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=TcQEnChL; 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 S1727967AbgAHMbP (ORCPT + 99 others); Wed, 8 Jan 2020 07:31:15 -0500 Received: from mail25.static.mailgun.info ([104.130.122.25]:34416 "EHLO mail25.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgAHMbP (ORCPT ); Wed, 8 Jan 2020 07:31:15 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1578486674; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=7BY+YDpvD+FCZPPlZGH7NQ/yH7pyhZGmScGsJHBppFg=; b=TcQEnChL54jCmCAtsMk0AUA8U1NM8saoQbTtSMcPDHeJI0IOoio29xbXKNmG9zATI13jDUDG vDVtip1rCFJmFLr73xu94ADAYG2zvJBrObOXLr8jmGEe/p7CXqGC5sHunnuytEGqHfemETdk tmGb1Wja7aFEYYsbRyB57RQIemg= X-Mailgun-Sending-Ip: 104.130.122.25 X-Mailgun-Sid: WyI2MTA3ZSIsICJsaW51eC1ibHVldG9vdGhAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e15cb8e.7f5f3e7c85e0-smtp-out-n03; Wed, 08 Jan 2020 12:31:10 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4B977C447A3; Wed, 8 Jan 2020 12:31:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bgodavar) by smtp.codeaurora.org (Postfix) with ESMTPSA id 526B1C43383; Wed, 8 Jan 2020 12:31:09 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 08 Jan 2020 18:01:09 +0530 From: bgodavar@codeaurora.org To: Wei Yongjun Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org, hemantg@codeaurora.org Subject: Re: [PATCH -next] Bluetooth: hci_qca: Use vfree() instead of kfree() In-Reply-To: <20200108035931.51209-1-weiyongjun1@huawei.com> References: <20200108035931.51209-1-weiyongjun1@huawei.com> Message-ID: <79e6ab011f21bc6edad81fc8a01aaf9a@codeaurora.org> X-Sender: bgodavar@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On 2020-01-08 09:29, Wei Yongjun wrote: > 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); Reviewed-by: Balakrishna Godavarthi