Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp995406rbd; Fri, 23 Feb 2024 09:42:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVAliKD3NBSfjxOmMu/OsxBv//bSf01xxpia09++QQc1F4aEdNwHo+q+w9rEOJ4OkQj3O4lbWkkElaKYVdZQTIBrDO9M9bzcVi9PGkXQA== X-Google-Smtp-Source: AGHT+IEU5wWQbpwYgEjCn0RWTqmu6yXL85ziuBbrdP+rXNfBlcvKJa43S6dq5ldZQPNkXSacvIpe X-Received: by 2002:ac8:7d11:0:b0:42d:a70d:6ded with SMTP id g17-20020ac87d11000000b0042da70d6dedmr484447qtb.11.1708710127451; Fri, 23 Feb 2024 09:42:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708710127; cv=pass; d=google.com; s=arc-20160816; b=F+XbTLq2gCxb8/PF+BXdYI4tiL6cilbG1w1O1gDmTMayDIfmSopUDAqyxdG8OuQuJv vjl5tOe7fMkSaOfSXhC9KmTsBSXroXyofAp/5Ma5t7WbkCbX9S13pfLArJZmFkoV0TLe FiwN831vnYe51jg1BpF0hCfRzgCjBYGC+gzt4Ok019g9LDyJX+mirGfRdr/COQKBXUDM LIEfda3AxYqU6TuYA9GfZCVFDSeGi769vnpFP706EB30XposLh/8d0XZlyDuo+fGrkhY wmJsl0PQuddSnad8ZebWkmquKkAQVsiHFrcF/CVp1jHCvVAJ2V+Srp5qkwdnErUNeV4b 07Ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=qRMrYm4dLpUzAECEZdPBMYvqYbIm7GzU/CvNrWfswqU=; fh=1GRoTyztHtbk7aOa4GbnBOLIYFeX/rLRE3/s/lntBcg=; b=gUXOyCMSubjpPm7JY+hHwmIJYFb4r6i5OM5UZyIbYTo5GogMKsq0CR7HoxSRE3zk/Y fZtT1IHVTGf70N7GMR1zlY9o3+dqbWn66iMY3wMrz1kNmJc0cPnsw0C7iEP0bI/EnAK/ TNQ8cu045uhFywxlxt2FQszCJIc3+r6/kssk/KwnN/kKNmBHOiKzxHepl2Qw1ynOvU4o U6EbleBwgcb80vVuNLBTEbemhL8lBPfKB4nJbOHEuf4u92m5j/tA9Ze8Cj/wbHf5PM3p 5Y/lwxosdx9gWx3d51C/roiJay/ox1DHRC8roWivIsv2Gx6ZMA8wVPbUp/Nqhk/F3ih+ ncHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h3dsw9wr; 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-2127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2127-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. [147.75.199.223]) by mx.google.com with ESMTPS id t29-20020a05622a181d00b0042c4c5c2ce9si16875506qtc.390.2024.02.23.09.42.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 09:42:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h3dsw9wr; 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-2127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2127-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 3115A1C24774 for ; Fri, 23 Feb 2024 17:42:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2839C129A76; Fri, 23 Feb 2024 17:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="h3dsw9wr" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 EE70D128822 for ; Fri, 23 Feb 2024 17:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708710120; cv=none; b=LN9vNNZcZYoKfJdiBkZUdyo4AVloH08bhnmZ2KDKEeIV1suDQxqBurWa6fw8El8vIFqOyvTKq6FSOsZgjTjxAPTBOXVFU3Qrzjt4+TiafKL2DTxSMClG+b2jS0Z01M5ySoBRanjNJco95F7SwWZa1FDBcXUdWi5MtgCrwhKfr9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708710120; c=relaxed/simple; bh=X6pQe7aR8rwHhqzW204nH35V9HhztDQzkIJNl+dBqt4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pKejWxGwGXxTRWv/ekFJ8eAT/w6JtPrZEh2PPwPq8okKOlPZWUn1x2AZPrhI1pQVc9yPuzb2r2ByX7IKzArDpzhQmxhV/Hjsf7ooZ7VvVmHa3x+FrHQTajbGCunwldHbUMTnSwZXH1B4f9OBp6iUWcHNlunj32XxGuv0g7i+1qM= 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=h3dsw9wr; arc=none smtp.client-ip=209.85.208.177 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-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d2505352e6so12614571fa.3 for ; Fri, 23 Feb 2024 09:41:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708710116; x=1709314916; 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=qRMrYm4dLpUzAECEZdPBMYvqYbIm7GzU/CvNrWfswqU=; b=h3dsw9wr4bYjM2LU/xjz7g0Y9V7Xe79wPiYjQX2DfHkgJ02/1Ajc7XaFWk7gDJM/dG jp5htYRoNWj/m2v/2IUdlD408r2mdaIEPmdOAYVgFfalmnwuiSsL9dLRUjc3IMK+Do4U E2JekV7QLnXMJnzxPs5bhFwYXNxl8jHNG/rsEBrxyRCVvCDpU6pfDQNmK4y+UC8UAcPm 76J78Os6wzA5ELcwRoKi9YD4wH43dOVpAQSf0rBFNB+RwYhudoqpS3jlrWPsPvncQ3Re vlPuEGavu9S3mDdo3NZIfdvKcN9MTckuPeFKu4dSOOZWQMNs6xMX4gPTFZflSkuJDb4C FIvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708710116; x=1709314916; 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=qRMrYm4dLpUzAECEZdPBMYvqYbIm7GzU/CvNrWfswqU=; b=e2Ggy28y2YVdwh+7yoRKKz5dGNhBnV+4cqgWf08LIUBYDFOJib4uwWQwW0OnbbDRq8 Wh9za/gBOC+wohhD5Mt2+LvvbWP1HZaAryDf5l95aJwRq93mDCt/cVUWaYRm7QLwQsFK nIVOXfwPNiweah6JsXV0H1rzjSdkA9MnnuD4E4bJrQZurNy4Z8XU6W+0rgpiXWAoG7yz yebK3q4knVvXyTsqsXcA16eNdXEh7fBKDsNFmMDjbbzXgLRzLj2scUZrQyRZ80qhQ/NI v80+6wUYm9f9i5VobANz5rST2qi8lhInS6cXaZStTYxEzd6etS8Km39G6WWL+LWKtaXJ klpw== X-Gm-Message-State: AOJu0YxDHTsjH1Oqoh7jsZxYjWOvUms1Qblt8q8zwlSAjN+ILXf5hGt2 94oRVlLmy5u6WUbzjZXmd1Wynp+r2IOIvcPaUo7fkrL9NGCB87InCBr5qbENT31YXYlvW+8OBPf h069gPIBsgGwDjvukwVuRQIr8gjAuBwsCH/A= X-Received: by 2002:a2e:9b08:0:b0:2d2:3b9c:6550 with SMTP id u8-20020a2e9b08000000b002d23b9c6550mr345490lji.38.1708710116121; Fri, 23 Feb 2024 09:41:56 -0800 (PST) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240223173819.973508-1-luiz.dentz@gmail.com> In-Reply-To: <20240223173819.973508-1-luiz.dentz@gmail.com> From: Luiz Augusto von Dentz Date: Fri, 23 Feb 2024 12:41:43 -0500 Message-ID: Subject: Re: [PATCH v1] Bluetooth: btintel: Fixe build regression To: linux-bluetooth@vger.kernel.org Cc: Edward Adam Davis Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Edward, On Fri, Feb 23, 2024 at 12:38=E2=80=AFPM Luiz Augusto von Dentz wrote: > > From: Luiz Augusto von Dentz > > This fixes the following build regression: > > drivers-bluetooth-btintel.c-btintel_read_version()-warn: > passing-zero-to-PTR_ERR > > Fixes: 36618e0d5a6d ("Bluetooth: btintel: Fix null ptr deref in btintel_r= ead_version") > Signed-off-by: Luiz Augusto von Dentz > --- > drivers/bluetooth/btintel.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c > index a083c4b8621c..6ba7f5d1b837 100644 > --- a/drivers/bluetooth/btintel.c > +++ b/drivers/bluetooth/btintel.c > @@ -435,13 +435,13 @@ int btintel_read_version(struct hci_dev *hdev, stru= ct intel_version *ver) > struct sk_buff *skb; > > skb =3D __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT); > - if (IS_ERR_OR_NULL(skb)) { > + if (IS_ERR(skb)) { > bt_dev_err(hdev, "Reading Intel version information faile= d (%ld)", > PTR_ERR(skb)); > return PTR_ERR(skb); > } > > - if (skb->len !=3D sizeof(*ver)) { > + if (!skb || skb->len !=3D sizeof(*ver)) { > bt_dev_err(hdev, "Intel version event size mismatch"); > kfree_skb(skb); > return -EILSEQ; > -- > 2.43.0 Looks like your change 36618e0d5a6d ("Bluetooth: btintel: Fix null ptr deref in btintel_read_version") caused this build regression thus Im CCing you just to confirm that reverting it and checking alongside the len shall resolve the initial problem you were trying to fix. --=20 Luiz Augusto von Dentz