From nobody Fri Apr 3 22:12:19 2026 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (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 329B136AB44 for ; Sun, 22 Mar 2026 21:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774213759; cv=none; b=NXGk5k0Hafz23MLTLXdmn748Wl8nqvcrC4iueHDMtMoIUib5un6mzaXTNmyarVjxO1/tg+Xyv2oh+gHzLSuvUcFh1h3kLVyjcnJAc/0SrrzEsodrmUpSn22kKD2YfOzT7g0cejo1L8eZWjgBIb1kmGzJGfVpiDuK/O01b5gk/sI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774213759; c=relaxed/simple; bh=K1AYDC8IU4VefpqdSf1/9FvLSZ4aap8F7Wg9vhexyF8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cVB0mpyJCNorqWD6V8Rw5+4OXCdjX+Ew5IGlpgmJFlaHRnk4REQV3WxTK0LRxry45mmF69HNe4Rb6wmmzTn9Yb8PlSosA5ExNfp1ReQHRUcD+9axKSnjpnub47Z+iYLpkLc5juUK9BRKVYVuNbaHjQiVLMMyQsAn9PJvLVv9nwU= 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=HB05lgnR; arc=none smtp.client-ip=209.85.215.169 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HB05lgnR" Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-c6dd5b01e14so1209594a12.0 for ; Sun, 22 Mar 2026 14:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774213757; x=1774818557; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ok8B17E9F5Gbs6VMeORb12tZdKJq1eiGicFxW3x7Y/I=; b=HB05lgnRM3olLjftsfm3yFA5U3k5KQW9o7niLJJ4h/1JWzZvoVXAoq9WBztqufm0SX UmX2zX6lLhjuC+9DdBa6IA2ch61XQHf0qxjQTFwyFiL5gtRc5TUW5Tdu6WRzELKZRAip Up58fVC7Y0fBwZGHY1hwmtmHNrr6B4OW/0OXbNg/Ceplx6Xwoiz+QFRLmUncTI4/QOka lKMzZ9QqZDB3mmHp0AJ1O2R/Zmyytx5scdONK2xyHchcnpJacmUYpqiFtdcHhNu3wwOY LdAieSPc7SRsnIQJ4RkfYBoVWBjGHN32F1YrpPUF51yJVLWTg5dDROEiV1od9yrJ1Go9 EPPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774213757; x=1774818557; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ok8B17E9F5Gbs6VMeORb12tZdKJq1eiGicFxW3x7Y/I=; b=cVp72cqI6b2gcD9jK721ULjYmTJiIY72Yo9XBJ933pSf+V7glQSUelDHOxs6IaWCv6 /LEUVJ0uFFwECYUff21FCohC4ScmCa/skHol1r9X7uMha903TAg0l2vf8hhHFhRqYv7m TEOLeIDnlP4XR34xuSsP0jOLUq6LSQqkZ0zKzvB5D5qeXgHSbkclJeNXtIoAXPQ1GX+T POs/daayFRktXHPwtMdVLGS5/DzPliQJ8uVMjYwZ78C8ckvdJWnC9rNdjQX7KIeXMaSI RyCMz6Rtkp/W5jJ3bWevvmH0Ml14eY0Jc201qQWAFt4JaaL+WgRBZGpS6ZoF77tMhwkA pClg== X-Forwarded-Encrypted: i=1; AJvYcCVvVkaAiUdwy19Z1NVhV4b/v8UQVibE/GgtXMcqlFZglrgtGndtx72bpjmX+4kK3XfNqll5+zz8cD4z0vo=@vger.kernel.org X-Gm-Message-State: AOJu0YzQU9CBjjBIFRg0Vy7wAeF+QJbmf70DrGb3syEw62M2OYnnM0Oe 9B6YdkfJGKPyJJcOkziymaxelX7QQn3orOXNLOUu1bLuy2NOF/JOOkQ4 X-Gm-Gg: ATEYQzyDINvXmD0YSke6e2lgCsXYR3P7KqAvadQcGQ9/JLY5yJ/vZQhmNAROXUN9OzM l0vHWb1Lvlus7oAkd/B5bvMJNAh44q/RA9fAAf69mgODUnJ16/MhMisOG3H0ZWLip0oIZYqR50i IHQ94WnLHknmxUqimIJZh8wJMrpZ/YXQHXd4KshSxlp/SHkQvy1dIFkOrDUx3ABbZySe8KZHhEP PCFy+nf5lcBgJPKU9b85JmGNPRq9tzTnaNmFExILb0XxwdIVzfRHqooQzD8/rUIO8ErJMbC+pcg KW9mCbVVKImzxMG7/ceohc/9CVAnCRL4UV2gzmGBpHCFk2vfMKVxYyWvly+xDdsYe8AybX05Adk LKf22lSCHWERfXhKMtIGoOAzA6+9DB5U3pF8arETV/qH+y8TzgfkksJM5oIda4/h13OohLxDtFW l3GBT6q9edpLEBbPTjAA== X-Received: by 2002:a17:902:c40f:b0:2b0:4158:c9d1 with SMTP id d9443c01a7336-2b082796b00mr93712315ad.36.1774213757435; Sun, 22 Mar 2026 14:09:17 -0700 (PDT) Received: from fedora ([103.149.158.95]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b0835429afsm84552345ad.26.2026.03.22.14.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Mar 2026 14:09:17 -0700 (PDT) From: Aby Sam Ross To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, me@brighamcampbell.com, Aby Sam Ross , syzbot+b170dbf55520ebf5969a@syzkaller.appspotmail.com Subject: [PATCH v1] Bluetooth: hci_release_dev: disable delayed devcoredump work Date: Mon, 23 Mar 2026 02:38:49 +0530 Message-ID: <20260322210849.68743-1-abysamross@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It is not necessary that the pending delayed hci devcoredump timeout work, hdev->dump.dump_timeout, submitted to the hdev->workqueue by the bluetooth devcoredump state machine, hci_devcd_rx() hci_devcd_handle_pkt_init() will be reset by it or by the timeout func hci_devcd_timeout(), using hci_devcd_reset(), before destroying the workqueue or before the hci device is freed up in hci_release_dev(). In this bug the active delayed devcoredump timeout work's timer object is active when the memory associated with the hci device is freed up in hci_release_dev() causing the ODEBUG WARNING. Make sure that the delayed devcoredump timeout work is disabled before the hdev->workqueue is destroyed and before the hdev memory is freed in hci_release_dev(). Tested the change with the syzbot reproducer that uses vhci device locally on x86_64 and on syzbot portal as well. Ran kselftest with net target. Fixes: 9695ef876fd1 ("Bluetooth: Add support for hci devcoredump") Reported-by: syzbot+b170dbf55520ebf5969a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3Db170dbf55520ebf5969a Tested-by: syzbot+b170dbf55520ebf5969a@syzkaller.appspotmail.com Signed-off-by: Aby Sam Ross --- net/bluetooth/hci_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 01f8ceeb1c0c..1c7ee2a33337 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2747,6 +2747,9 @@ void hci_release_dev(struct hci_dev *hdev) kfree_const(hdev->hw_info); kfree_const(hdev->fw_info); =20 + if (hdev->dump.supported) + disable_delayed_work_sync(&hdev->dump.dump_timeout); + destroy_workqueue(hdev->workqueue); destroy_workqueue(hdev->req_workqueue); =20 --=20 2.53.0