Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp62064lqb; Tue, 16 Apr 2024 08:51:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuA+4eGL6aGteY+4PDLRiwzbU9RmyNtXZCfIq6GMH6t3O2EAwjb3c0zMp9thlgaQr0m5rrFk3UeOA7cjC8Br7VVztItRYAnk84rHI4Og== X-Google-Smtp-Source: AGHT+IHKxkNIIw5+ZE/d2v9eR8R9CuugUSypQ7wYwN6lpzUMlY7YLxryac+v8rATMuef9E/C6S+I X-Received: by 2002:a17:90b:3e8e:b0:2a2:b097:dabc with SMTP id rj14-20020a17090b3e8e00b002a2b097dabcmr14006148pjb.31.1713282707386; Tue, 16 Apr 2024 08:51:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713282707; cv=pass; d=google.com; s=arc-20160816; b=PNLFHZ7GTFR7rmI/LlKQVURiJu6IihFpWF7hqaa49rv0sZGDYcfA/5MWPPaS2+mo71 DwKd7rXaNA19Tf2rHlnTVzDER2Dqa7TEGi8bSQbnnk7s2VMCd1+YWa7POaGB/ULA6Ag4 WbUG3BoMndYkahvkaUDk5dEafvWZYOTXVRfIO/VVTFtSXoUdnB65i4VkUBZmhsba8nTH 41RKj4aKdL8qjCBPXI9hTtxdWEbpWYFU0fi8YsOFPD3Xmjb/MxvTrNtsnQdJlSk2rZwH +Znk8Sfv16Xxox2j29/4ygocA8krj9s5nY6d77ga8wwxPGpF3ka2iw7sj+DOC2RuLB7K bL6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:date:message-id:from:subject :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=rctYDHd6HpWITCOrcfT+/Ja7irAdcJbTduCGbynHgok=; fh=fAVvqa29TMCSLQ1BWo+IkeTh9vOt2h2EvlnFWIq0DOI=; b=jp/uAsTrkaXhPC8sUq25uZCBFBtmqllCDW+vp18vmLgosKw5Bgw4E35O+FHByKKte3 wGE9SRAwXQXATE2pSZ2Ge9SXdNhPqLl/zAXHa/fGoqqcerdnL2W4/lKDO/lC3srYdbwm uqtPBUjgMrSwDko+9n8HTG/gObt5XfaRiYrMIrpNssu7Od5h74RvK1rvyQEpeH9oWlJe d1G0jFiZ7syljxWtcqN5h2JtJ0CTRRUxQZh3cwBeuRsvyN+Y/bAoy8vuYdFlhuLV27DR kjDIaP1rxQFwJ2r+AslIdRurxhQn5uwgvJgVQbvOR6cHgyd+4KnalzDG+3GXVIWRqDHK F2Hw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=miblyTj0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-3638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u24-20020a17090ae01800b002a52b1d6d11si12247321pjy.147.2024.04.16.08.51.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 08:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=miblyTj0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-3638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D7FFDB22EAC for ; Tue, 16 Apr 2024 15:40:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B27A313173C; Tue, 16 Apr 2024 15:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="miblyTj0" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F5BE1311B0 for ; Tue, 16 Apr 2024 15:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713282029; cv=none; b=C2UQBloC3FMEAZ01JJcFXy/REAahz0GCWShiiBHPvZkGt/04jYWZBvCLNyNSZ2GrVo/7+ytv0Em3rtELKD3D1RXDysymIzxACi1ixiVIWAouQpwyz640lhznr5Q5XWDf7WEutNfE2HEj492kfy5FNGhOpNoPaKOiAlUh5hMBEYk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713282029; c=relaxed/simple; bh=CDvUf501ExbeoTTLPR+fG8fyWMtt7DKGsn5hvuVK+ZI=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=WCXa2gqcKXoqXGLfzp5f2JneY0Rxn6pk9UFqDg5WzX0NMHuRKCUATw573C/Rul5VdR4r3Bwv4iCrlfWAs3NM0OkusEta1dKin3DXHyr/56FJqR7o2NEDuwGCJ1sMRhVEd8ZC/uuZj+d8RHaBYcPPDbgEL+StUvb5Gue3xReTuCw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=miblyTj0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 0075AC32783; Tue, 16 Apr 2024 15:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713282029; bh=CDvUf501ExbeoTTLPR+fG8fyWMtt7DKGsn5hvuVK+ZI=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=miblyTj00k3vc8E2sedPLfP1H8Vv7QO1krHptqzVWXTaTPlBc/KuVUlnbMP30Z9K6 lrz+IZfIhrASCk86pKccRRgRIaeIzKXJ9A8KXIyPROLZ69Mn6pbFFkASaEW3YAU4ho FjU/K0AO3Q9xCrq7U9RVenp935qU/N2ESWGtyxLbRjUqULA2EZ7Q0Zh4+RTOGbdLYi AVs0gwXuuIuw2+/vjX9mFhV9schtA1wx51hZjcA/VAbJPDiGrZPwn2Xdw5lbGM+MVF 4Fr9TZKITXgDidNiQxJ6Qas0WNk3/2NTY8kw9lF8lLTgPF1XZFHxCE9TErShN62DMt OhXXDvN+CniwQ== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id E935BD4F15F; Tue, 16 Apr 2024 15:40:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH BlueZ 1/2] shared/bap: clean up requests for a stream before freeing it From: patchwork-bot+bluetooth@kernel.org Message-Id: <171328202895.2661.5369436299401809718.git-patchwork-notify@kernel.org> Date: Tue, 16 Apr 2024 15:40:28 +0000 References: In-Reply-To: To: Pauli Virtanen Cc: linux-bluetooth@vger.kernel.org Hello: This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz : On Fri, 12 Apr 2024 22:55:55 +0300 you wrote: > Cancel stream's queued requests before freeing the stream. > > As the callbacks may do some cleanup on error, be sure to call them > before removing the requests. > > Fixes: > ======================================================================= > ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000013430 > READ of size 8 at 0x60d000013430 thread T0 > #0 0x89cb9f in stream_stop_complete src/shared/bap.c:1211 > #1 0x89c997 in bap_req_complete src/shared/bap.c:1192 > #2 0x8a105f in bap_process_queue src/shared/bap.c:1474 > #3 0x93c93f in timeout_callback src/shared/timeout-glib.c:25 > ... > freed by thread T0 here: > #1 0x89b744 in bap_stream_free src/shared/bap.c:1105 > #2 0x89bac8 in bap_stream_detach src/shared/bap.c:1122 > #3 0x89dbfc in bap_stream_state_changed src/shared/bap.c:1261 > #4 0x8a2169 in bap_ucast_set_state src/shared/bap.c:1554 > #5 0x89e0d5 in stream_set_state src/shared/bap.c:1291 > #6 0x8a78b6 in bap_ucast_release src/shared/bap.c:1927 > #7 0x8d45bb in bt_bap_stream_release src/shared/bap.c:5516 > #8 0x8ba63f in remove_streams src/shared/bap.c:3538 > #9 0x7f23d0 in queue_foreach src/shared/queue.c:207 > #10 0x8bb875 in bt_bap_remove_pac src/shared/bap.c:3593 > #11 0x47416c in media_endpoint_destroy profiles/audio/media.c:185 > ======================================================================= > > [...] Here is the summary with links: - [BlueZ,1/2] shared/bap: clean up requests for a stream before freeing it (no matching commit) - [BlueZ,2/2] bap: cancel stream operation before freeing setup https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d3a6a6459cbd You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html