Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp271468rdb; Mon, 18 Sep 2023 14:50:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHCz+CLulfcBKhz99OqVliAKhcIY3DAKs2OHIOFWDaL1eMW+TQTuRj43kajgYcFCApCDtc X-Received: by 2002:a05:6a21:61a:b0:155:5c28:ea67 with SMTP id ll26-20020a056a21061a00b001555c28ea67mr8821290pzb.38.1695073810808; Mon, 18 Sep 2023 14:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695073810; cv=none; d=google.com; s=arc-20160816; b=h4dPQrXejXpCBIsI8bNjyoNZQr8zDb9vvxbhJaA5Djf8J+5OwrNzCWpger9EWIcru/ zDPzAxkT4yloIAtjgb/kMgR2Ae5do4m94Lk1wShr8G4bOXNx2oGRlqXJ4pciziUVMqs2 XaQ4ol8usSaEXUfWyTaA+LlppqxPk6o0011fOYm+px9zHsqsmNUnNJOSbvC6sU7LMDwh IBG1OJiCWkPBo3mA1qM0FoHY4X/qwMrgvtatzo4RsV17JIKz+yjsYP26EZ+EhsdQIPtv EyrOBWv/TDjOlEzbdCySMLn494vQ/6xKcUNON2O5Wp8GSsJRvTUvDuWZiBUlqNu/n4T0 IV9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NBefTqBgVyoSUAhFFxsBE+sgujgWPn4S3aI0Xo/uwRo=; fh=OzGdaeiMjZgYAHajX7vnKwSpSiVzFDxYaf+uz7SF2AY=; b=qfgj5RB9MJhkTp/zmg05WJN4v0z0P1VI2JlVIonp0q8MCrm5h79fwHMZRevG9M8HHO kdZ8gAz4eFtRgNV8+vEzleDA0L6NF+7skxbuN6qUmhbVj7pTPB0GzZWaCcn3eU46DpiS R9IAj5fE7RiUZC9EwrcDdfmT5N+xC5XBhADV7vTmasVGXj7h6lSU3KptztTbSZz2KhB1 LGzCdQm0oeOJxf//e6NffZS+/hinqCDaRUM9oyE1tvP9TobqyCxeGK+HfQ+evGAtRnhs 2sslDhH573vXtJNB0pBvM45ATDOQB1j+ksWQ1ShpVEIjdkftLSs8WSf0cafuCQkNP/w7 Qmjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Axdp0+FN; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id nv8-20020a17090b1b4800b002767c32f006si1454993pjb.41.2023.09.18.14.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 14:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Axdp0+FN; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B7AE68027F7E; Mon, 18 Sep 2023 10:37:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229561AbjIRRh3 (ORCPT + 99 others); Mon, 18 Sep 2023 13:37:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjIRRh2 (ORCPT ); Mon, 18 Sep 2023 13:37:28 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0D1DB for ; Mon, 18 Sep 2023 10:37:23 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c00c0f11b2so20190681fa.1 for ; Mon, 18 Sep 2023 10:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695058641; x=1695663441; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NBefTqBgVyoSUAhFFxsBE+sgujgWPn4S3aI0Xo/uwRo=; b=Axdp0+FN2s6Ki/CL9BRe3+M2E8Qg1xMOYmg37YO1SL2wLAjtwEIULFkXtz8l/VMyMX iosffPHi7XQhrbC4LtUK7iVCBAmjKW5SrBqSrw5eMUENamkoytxRZSDAAzE//AKtbMkL xPMCMZIGepRKMFGhBFxwKypZ4UrKG5lsxJa5vmhFPKdFgcFfttotQnvQ1QwYEm+XQkwn fu8q/aniZnA7IeznXUkfTCuN314VgyMai2h78FvQvXq5VDRTAqe2ma0anLq9r248DAoV pQRNMdWkdI8zk4c2bfgwJVmuBRD9hndV0npq7IUuqcHZqqvngBMZMOdO/qXY9DbNaQYu /esw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695058641; x=1695663441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NBefTqBgVyoSUAhFFxsBE+sgujgWPn4S3aI0Xo/uwRo=; b=CQJPDf4OQDERciEHNteFsi6qkz96AeO6uek8J+UK8zLs5/4QMOy1LPkECcF/44SU3M RuW2ukbijVS5TrHxz43jsWWlJn7FxV3eSU3MUQ7HUiTk0jC4He0gA1/pXhOs6dktcqe7 X2gAdVLT5elRzcZC0oT/8ENT9k6p1W550jGxZMyAyo/K8ANqtKGfLGig2TzFoV33WTnX iISKY4KbR979/e74k8qWx9ezKLvrUZdkAuxfFn8L+arq2K3qkiPzqGdqjc2lnW5kp8l3 061F274tV6wSx/H6K7EVnhtSTgy8tYL0hhk0YERrDZ0z11bIDDc6OTk+aO/sGbD2O3Jk ut6Q== X-Gm-Message-State: AOJu0Yz2qjq/c5oa31+SH3CZ5WF6oII/cwhXfOIduEMIf4gNUuSmygNq /xLK1fU6+rEGdNRDOsIBC1WrVBqx4spuUCvgGMzgwos7LtU= X-Received: by 2002:a2e:9556:0:b0:2b9:aa4d:3728 with SMTP id t22-20020a2e9556000000b002b9aa4d3728mr8322158ljh.29.1695058641051; Mon, 18 Sep 2023 10:37:21 -0700 (PDT) MIME-Version: 1.0 References: <20230918093517.2163899-1-kiran.k@intel.com> In-Reply-To: <20230918093517.2163899-1-kiran.k@intel.com> From: Luiz Augusto von Dentz Date: Mon, 18 Sep 2023 10:37:08 -0700 Message-ID: Subject: Re: [PATCH v1] Bluetooth: Release memory allocated to store supported codecs To: Kiran K Cc: linux-bluetooth@vger.kernel.org, ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 10:37:26 -0700 (PDT) Hi Kiran, On Mon, Sep 18, 2023 at 5:04=E2=80=AFAM Kiran K wrote: > > Memory allocated to store local supported codecs needs to be freed > when BT is powered off. > > Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages") > Signed-off-by: Kiran K > --- > net/bluetooth/hci_sync.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c > index 1be5763c261c..3640d73f9595 100644 > --- a/net/bluetooth/hci_sync.c > +++ b/net/bluetooth/hci_sync.c > @@ -5074,6 +5074,7 @@ int hci_dev_close_sync(struct hci_dev *hdev) > memset(hdev->eir, 0, sizeof(hdev->eir)); > memset(hdev->dev_class, 0, sizeof(hdev->dev_class)); > bacpy(&hdev->random_addr, BDADDR_ANY); > + hci_codec_list_clear(&hdev->local_codecs); > > hci_dev_put(hdev); > return err; > -- > 2.25.1 Ive sent a similar fix already: https://patchwork.kernel.org/project/bluetooth/patch/20230915234742.3739283= -2-luiz.dentz@gmail.com/ --=20 Luiz Augusto von Dentz