Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp504057rdb; Thu, 15 Feb 2024 06:52:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU69AjriwTURy7qnuyj41CZBNnTOMfrAw0/RGwb8uPxZIGcLvv9KM25VDaYwazUv/O8hLwroPWckKl5kRUu69IgocGDnvdLFygcSZWL+Q== X-Google-Smtp-Source: AGHT+IG32+J9fUto/G7tH/szZdUL+t8+qC+et6n+wtxc2kuSIE9IMJnXxehHfOAD9o9H7GF4QMK+ X-Received: by 2002:a05:620a:810:b0:787:28cb:5ab8 with SMTP id s16-20020a05620a081000b0078728cb5ab8mr1835310qks.41.1708008759095; Thu, 15 Feb 2024 06:52:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708008759; cv=pass; d=google.com; s=arc-20160816; b=n3cwrcgipJTQgnG/MOqhxRpWLK0A03gPyOMFlgLeMRkNnZtS90xTGKo7xMpcOV+tDo f3k1uVgPcejtMsMhP4C4MgPgybynyvDAVe/2FsYvcIuHZdQ+Tu2a6Ajwu6IJvM/vf/Uh HUkSxqrxMFBWY3W5vm+gCCwf60MIZ+wuCyPwKaBGAPeBQpPx8FJHbFHuEDGtXWER2pQS NqVT+k7YlpYLLoCj8bA11gCWH2PrmyJKqteBoT9hw4gUGMptMPVSEnHlYtqY4sTcsZ9M R4SbBqHsWW6KtPaX9fE6BeC1N4TIupOuytZt8zP1b4WxJmnvqjHIF1E+CdQA3urrcn1i iTyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=+zqlyj89c+b77avkp8e3ee2tSDCXe6StZO0D2g7F0pQ=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=Jm+hXav7pSEq1P19BT4streVNTEF3zQpEGi0lZZNTRuQfqDe5iXFjYc+81OitGhseX kD0D+ZC5BwEMqRKF4OTR2WzVfjKjV9l2/PLbb2Vl+5ii95K3CqJ+OC5dIErOtJJeJ84/ 4mZDHRaqVoL3nzpLTCiJDM9WCIh+sDQuHnyA0A7DaqaDH1SBH9D3XKP0dvAs+gbjJ1X9 Knjs6VATfoLeK5UpT9L/j8m0tfNSCxnwlxHMnmbQ7qtV9PvGoZX3vmCOZGJmxEB38XGX AhFxqJkTxp8wHr/Vv6DHPFvyE/dBCA/RSxHqLuELxI5Dbun1/CyolS1H5KdE7ypJlBrP 9b2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VPFcF12c; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m21-20020a05620a24d500b00785d97bdedbsi1828434qkn.186.2024.02.15.06.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 06:52:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VPFcF12c; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D5671C226FA for ; Thu, 15 Feb 2024 14:52:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01FA6132481; Thu, 15 Feb 2024 14:52:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VPFcF12c" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com [209.85.222.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE8DF433B9 for ; Thu, 15 Feb 2024 14:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708008753; cv=none; b=hCfabtraJTtCYAhOUABcywa9/CDEQ1/aiBLR3Ivzri4KMA5p/oBkgbfFLK4JhnVBndyKE1AI2s0pjI9UpFBFshoTZTr+ULYbYbRHYf4WDnuwWFKnMyBdtRr0OhFqM5f2GtEweJNwjAgl2Wv0jtKTnKoBd5fFcPcN06e1XhSkFCk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708008753; c=relaxed/simple; bh=cgjR6eMGXss5LPeJh4Lmu99K8/2KOOUnlcinQ2hNkHY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Ud7iQ4Txdh/miLzRBgl+fojvh6oHJmOyZ6AfjHexmQDXVzeEI0jeXBC7dHT25IEsa6dhA8O6ZGxsbO1CBkIajXcS3NAoMceUxD3XYzcq5Lk1eCREn+Xrh96iC734Ax1kJHKJHEhxnkf7gIWAPb1fK9D1MYBWXc/w0FA5kP4bQTg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VPFcF12c; arc=none smtp.client-ip=209.85.222.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f54.google.com with SMTP id a1e0cc1a2514c-7cedcea89a0so618415241.1 for ; Thu, 15 Feb 2024 06:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708008750; x=1708613550; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+zqlyj89c+b77avkp8e3ee2tSDCXe6StZO0D2g7F0pQ=; b=VPFcF12cn+pWyM+QESykR15fkMIZT9RD89c+sl2HXk1cMlCdAusgdA/b7c40z4TVGy JWq8SVu3AAdyjTtObLn8I2Pkb6BpnVqC6V4xOeMftLWrZJKz9PznGYT3oUGBwihQNgT1 6sxhXKRCkIpUPsAwXoTQyq+/0GDT+ieI1kF0jUdttlIS9XBd4/KIw8C3M3NGiDW3ZKBI 1mMmSrctPmJ9FoDRa8Fv5/2dSl6nTOmGKN5ntvEyCloq723zThC/IQ7rDZkAe5M9U4+J GYGskcwXmilKCz0Hs5MuwqmOJaOFtT71WeFct5t7BbNF6fPJxEDq/5ZykZ85WqbVLNQN jAQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708008750; x=1708613550; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+zqlyj89c+b77avkp8e3ee2tSDCXe6StZO0D2g7F0pQ=; b=lX1eHQ5GNFGhx+pKkGSva8irokynDwyoN3G2E2D1wEuoZdwEGRiUezO0p1JiwlCAxc U7I8YxnG3AgcCtXrvas4xC/y4RAfTbuaXMgB9y4+h8oO80dO5uNitt0j9knZs0HGoLQn gQsUv+4dBObFQse5TN4ADHttnzw2TthD0yIcHWnVEXwVhXf7QQkMNfQLdpOY5eHwEJkb Ji7evPDbCv/QquMRYAhEmrpAHsB5Rsw+ws7wz5V02cE+sQHm6gr/BiWt8WTDrzT9+rg3 uN3TqbCRNsB25SYU8AVmBOqAXqgKmwWH9/oPuNkwl1GVCnxdwPJuCH/7KI5/P/D0IlxI Phug== X-Gm-Message-State: AOJu0YzqklORomHjFSGjojVFBxW5ZX+W+TwnQ7icny3b8ib4oJqRL+uK GVou0rFvX6gbrix5vU17fJILN4iGUr3c3JOY+9qQINfZJxOMOvepDwv2UDTQ X-Received: by 2002:a05:6102:6cc:b0:46e:c427:7f2a with SMTP id m12-20020a05610206cc00b0046ec4277f2amr2433104vsg.11.1708008750059; Thu, 15 Feb 2024 06:52:30 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id a21-20020a05610222d500b0046d200fe950sm192806vsh.18.2024.02.15.06.52.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 06:52:29 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 1/2] btdev: Fix crash on page_timeout Date: Thu, 15 Feb 2024 09:52:26 -0500 Message-ID: <20240215145227.782554-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz If remote device cannot be found after page_timeout then the code shall not proceed to call pending_conn_del. --- emulator/btdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index 4c9f5d1811d4..139ab69b4029 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -1248,6 +1248,9 @@ static void conn_complete(struct btdev *btdev, struct bt_hci_evt_conn_complete cc; struct btdev *remote = find_btdev_by_bdaddr(bdaddr); + if (!remote) + return; + if (!status) { struct btdev_conn *conn; -- 2.43.0