From nobody Tue Jun 16 19:33:57 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 5343E3FE362 for ; Wed, 29 Apr 2026 13:40:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777470067; cv=none; b=g5+LDa4gyUkf0FyywuOgZZhBRVTKAJKXVitTc5YLVVLsm3CvoHU/UgaSK4jkCiLhFtEYX/+gq0Zm7QV1+d5RR7Ykb6UZ6w0xiBLKZKT730W372K8DCjP4BNRix6n0lc7FTkFPJkoh+4b30biWRnsSV98gECPmMKnwHHj3x6pByE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777470067; c=relaxed/simple; bh=VvWnO5p7rH9s4xOJKUSBq25CDGaY3gGzJmvgx71arec=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=VcV7vPEoNbpV065wZQuvTvmBz4bMoY5elDUzQEoe5V4AWAuMqRwhyldMgwy2lyFir9F/2xK3zD9YF4FM5Yx24eo4VUqMmK7vuRIYmA02POHMbDJRuJGUwNBOwheNPrsp7L/8oS2T2Wxf57YHz8zlhQ1qaEfLAaonC8MsnQS2A/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Ku0yW6Kt; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Ku0yW6Kt" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4891ca4ce02so87445e9.1 for ; Wed, 29 Apr 2026 06:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777470056; x=1778074856; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=VcF+qL2+XHdM3kJjnpyvX7fweQN4QlGSj763XZNBxs8=; b=Ku0yW6Kt0SFPd65H0i/by4t1wogt9u637UFJZJVZDPUt+OZCPzzHq7k8z0osF1NURO 3n63KsL0dfUbx4ebrdBvld07VUo0aIxW5yrz/SW+oM8yyg7nYLt5m4XtYlvus3zNAbh0 weXI2300ZUzm/yNbCrCPbf1V6QNfNR4piEvcmVrRGzlPQywa38ldCLoP0ntv8w+ntUyE /gmwlkNB8zGsv+kg4Dj1q6zSN+zZi0yyX1a46oxGvCco++uMXIrNe2oEwyD7izDeOSR7 1WjruAmNP5ASHAlm6Ow7oJkzRmJW9gDDLopnSoN+OHYW75REP2O49WWNRrfjoNEzhAH9 bmjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777470056; x=1778074856; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VcF+qL2+XHdM3kJjnpyvX7fweQN4QlGSj763XZNBxs8=; b=mK0pfJ4E0tRm/iPyHECmdOW0HH9NdI66VRzeA73Spiq8WyKheuDicK8GIGh/2c+PZ2 swW77zf+4o2PRll5PPcwUxcSAcfhQuXIwYMcnnZQxIWOVt9PJhVlR+AyYCgzWg9wZpVi 0EGzJTc4kajNuQwS5WwIQgB46DuESNRvrIIntB/sWnDjww0CiFCjEkbyCQg0G6t+cyeD SW6+a85CrY9KAlhqLGgF6WeaxXRNz3icacKJV2o+1cn+B2TFadJz+3klwfiawZZb0LMR M8S/H8rAPN/LG5hKkBfwh9vezap8nU8LzpeTMr4dGmVb6xmJxZh2/qGKuI1mjQ0ZqH83 pFFw== X-Forwarded-Encrypted: i=1; AFNElJ+DXzrBaELFAdugfLYkRSPw619pPX+sS/h8IFCfmGVoWhmwtafCVwrBiE7HqLVU/eP2vNKO4WMyMTvJdSA=@vger.kernel.org X-Gm-Message-State: AOJu0YxcxM+4dNMHnT/mqN3nnaE2mfoOOg1PIG4jj04A3GsHoUKmDh60 6T5TBA4muComClSPL0oVohdu4IjIY1IUV/QXpboYS++Yg6pPi1qm5GjH+i0P1nRL8A== X-Gm-Gg: AeBDievsHeU5Dmsdux6SEKdGxUom8fvUd6GByu7dLjS0Fq/JRde3yIWzH2xFcBIJ7c4 o6N+s+6wGEGkVQtg/SDjQiyf23+ktwbN0H3gd76zx5ZnfsHG34n7n8RRjY/qT5h9eclOFgjQ5PV DLUKeZcXgnqZ/NJtkXj2SxfsLIPv5DrtNf0hA4fGhL3CWz8z8BoB4eyufDNknRflujWhvDbT2if sOU/cIFr3FU75cCgA4Pnz5n4TcUN5I1jcLaq7aV+wsm1hEUIa8gdg3NR0oDhCLb+dHcJ3dv++so 0Atw9O5yGZMKacdFy/SfG55f++4TxVRfdZq5x5c4ebYY/epcOoZs6Ud/IEEeyzEzGleHMlo0H0C m6pdmQER7j8fwqzKy2Cn42hvMBqUOI5Jtg+DJjOfCvVVig97ixhVRCOb74qTAFt8TUjfB4MVrcm BAAj4ppdD+68iZL9DU3Ok7a0yTqDbMx0FADKHoeBQ9ulOZJgKUkhAOiU7cO3Z7RFuOxsR74Bvw X-Received: by 2002:a05:600d:486:20b0:48a:5aa3:ac1e with SMTP id 5b1f17b1804b1-48a7c85d6c9mr895825e9.3.1777470055419; Wed, 29 Apr 2026 06:40:55 -0700 (PDT) Received: from localhost ([2a00:79e0:288a:8:4582:e630:2e06:ee0f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7bc7a359sm90738615e9.10.2026.04.29.06.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 06:40:54 -0700 (PDT) From: Jann Horn Date: Wed, 29 Apr 2026 15:40:46 +0200 Subject: [PATCH] Bluetooth: hci_event: fix memset typo Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260429-bluetooth-memset-fix-v1-1-73507b81a903@google.com> X-B4-Tracking: v=1; b=H4sIAF0K8mkC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzMDEyNL3aSc0tSS/PySDN3c1Nzi1BLdtMwKXQPDFHOD5FSDxOQ0cyWg1oK iVKAw2Njo2NpaAIxQvUFmAAAA X-Change-ID: 20260429-bluetooth-memset-fix-01d70ce0acf7 To: Marcel Holtmann , Luiz Augusto von Dentz Cc: Iulia Tanasescu , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Jann Horn X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1777470050; l=1634; i=jannh@google.com; s=20240730; h=from:subject:message-id; bh=VvWnO5p7rH9s4xOJKUSBq25CDGaY3gGzJmvgx71arec=; b=kpg9xvBqQqKhZrwIP20Wkr+gWJOJQG22s84+xfDG/LFYd2DoS8KLlesBYgrV82dN69EQek5Bi g7cWU8f7daWDbfy22UarmMN3dlAdszshS0rSkcbyhFmWsDrTdj1Akbf X-Developer-Key: i=jannh@google.com; a=ed25519; pk=AljNtGOzXeF6khBXDJVVvwSEkVDGnnZZYqfWhP1V+C8= hci_le_big_sync_established_evt() currently does: conn->num_bis =3D 0; memset(conn->bis, 0, sizeof(conn->num_bis)); sizeof(conn->num_bis) is wrong - it would make sense to either use conn->num_bis (before setting that to 0) or sizeof(conn->bis). Fix it by using sizeof(conn->bis), the least intrusive change. Luckily, nothing actually depends on this memset() working properly: Nothing seems to ever read from conn->bis beyond conn->num_bis, and when conn->num_bis is increased, the corresponding elements of conn->bis are initialized. So I think this line could also just be removed. This is a purely theoretical fix and should have no impact on actual behavior. Fixes: 42ecf1947135 ("Bluetooth: ISO: Do not emit LE BIG Create Sync if pre= vious is pending") Signed-off-by: Jann Horn --- compile-tested only --- net/bluetooth/hci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index b2ee6b6a0f56..ad3945e4fe2a 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -7168,7 +7168,7 @@ static void hci_le_big_sync_established_evt(struct hc= i_dev *hdev, void *data, clear_bit(HCI_CONN_CREATE_BIG_SYNC, &conn->flags); =20 conn->num_bis =3D 0; - memset(conn->bis, 0, sizeof(conn->num_bis)); + memset(conn->bis, 0, sizeof(conn->bis)); =20 for (i =3D 0; i < ev->num_bis; i++) { u16 handle =3D le16_to_cpu(ev->bis[i]); --- base-commit: dca922e019dd758b4c1b4bec8f1d509efddeaab4 change-id: 20260429-bluetooth-memset-fix-01d70ce0acf7 -- =20 Jann Horn