Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1234293lqh; Mon, 6 May 2024 00:50:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXuWZkuuQ7IJMgbdBdkztNcslMX9AShMcBvq4BNKMug/JW75H9qnAyntsqE0dILR+qlSkbw82q5USZJDagtondIJyj7Hs0nH4/2vYTV7A== X-Google-Smtp-Source: AGHT+IEbpnTbmfu1L/IsNNNT0jgSw6h/Tj4t0tMz6m8npsVFMGctITQtAIJTSkFscvHRW9UmsVyQ X-Received: by 2002:a17:902:ce8a:b0:1e4:9ad5:a666 with SMTP id f10-20020a170902ce8a00b001e49ad5a666mr12186129plg.25.1714981809286; Mon, 06 May 2024 00:50:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714981809; cv=pass; d=google.com; s=arc-20160816; b=i7ek9NqiWvQEjDQkk5dEM8qSReAsqQuSD/iV13MoJFY4drYEVQ8KTLIgLzh4cMCjWl JDf/qjDR73M87/N5l6rZ0hFle8ZrmKmoUkXDTeE+Xwkl82iTvZb+AuFQtd4Pzgybjvub 0LnAYbXG60+K+hIEU7gZjHixzx0YyTwdFnNnKgqGDy47U8e60BO7xzEJIYu+BXp/iZqA yIeB3reqAaOAoovI7AG9Ly41WqdtxNcZvbQOOdXplY3ZeE2OvVV8TCRdj5NsMCNAt4kQ AarQdxvi4I//TdpISPCJ+x2Lfv2XT50kvhvgdBIF4Pgrb1gPiR8qTcioHnKYLogdQLVb J4iw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Wy+vVJQ0iWkoCdA9Qmo4Rt40i0yNw87dNgl4mUr+x34=; fh=co3S2pralfnuf+uDz03wCABlTekVShzJpdKeZ5ApouY=; b=WvR8WoYhMnh5ELtYrjd6T0R58+XAw69uM8x8LWfJp0feZrLLDi1tIG0UzL9h1nnY6N Wz2Sg5lTJ45GUZ0GHWm6b+sRp05QZlrSMPLqzYzPJljjlTw39g58ylyjWNrZfkqZqPyL YuXBZpYxcG8tHIiydwAW8ac/xV0Y8F/6hkaeeVYjuQf3xb3j2uF0d4N2aqHQDVb0nhjt hut8hajvnBN5No3ZmfymxEUNGfKJCA1Lt11MSD8Q74Jb9fso8OUlyx3rxaWuWjDdAzAX whzExTBgDIbBkPRsr/gaXxPzFutxX+KRBLFioWYnATPOrcwfYxf3ctPdZ574cpGJlfZo 6AZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNI0+H02; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h1-20020a170902f54100b001e4154e8a81si5560715plf.526.2024.05.06.00.50.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:50:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNI0+H02; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4323-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9BAB528232C for ; Mon, 6 May 2024 07:50:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7C3814038F; Mon, 6 May 2024 07:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZNI0+H02" 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 2A900381DF; Mon, 6 May 2024 07:49:57 +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=1714981798; cv=none; b=sRmPgB7sbcCCiNWbvY91KwOk6ri9PByvrRYcFpjupaRWI0Ah3emR4T0oyPVgzCCQtm6JG851HQxYEYhcCySLK0HPIl5Ag8I2eWLAPx0TKK79X2EhO57ljsRbZ9PLzZ+vsPjblzOmRoS8pzb+pmh4nkoSxVMy7OP9M4/qnJg1nnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714981798; c=relaxed/simple; bh=AldvdJy6yYm37EF3i71sslpEwK1DSJ9EjAmYdBn40qk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GDZRsnKtmDhbJhVzt/4iWdiesJF4QAOrFaVObHn0y7I1kTXHiCSGfUiEpvUbNMj6HO0JD7fLXeTYDaiR679C31/a3yprryeta2R5SHIF2QFYtisWcH5A58SI+Ds+wW/FzJdEhICHrR7Z737vbJSov1qvwrsMq5OMebSI57H/0PE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZNI0+H02; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F01EC116B1; Mon, 6 May 2024 07:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714981797; bh=AldvdJy6yYm37EF3i71sslpEwK1DSJ9EjAmYdBn40qk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZNI0+H02XjdjlVmR6Cx3OzWOiBtjcRpk3xgkvyOqbhDCkhMr3vHP0oh+i33tTx/Ma FV8nNda9MLbM3QZGm5z9ZtjgOTO+yw7dj7YUi9TuhDLjepQpIVJPklKABB1S6On5LW oJ5tds7uhKrQJhDZ857sGfoNTlZutt2i/iY/3cvCUzxoZS7Gngrkw54hHdt4axYBSt TU2TYdNBHJnGFHkCJMQnHXAIQdn4l+TT7XZfl1B55vuihq0/UG7H42wGAwwErVRL4n geNSjz9lviHD590Q4TJUXY1fPROtIF2HIQpsm1nanLDDA/Sy+5piOdWJ1+hdj+tU/1 APz0SNhKevnhw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1s3t6k-000000007nV-09n7; Mon, 06 May 2024 09:49:58 +0200 Date: Mon, 6 May 2024 09:49:58 +0200 From: Johan Hovold To: Dan Carpenter Cc: Johan Hovold , Marcel Holtmann , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] Bluetooth: qca: Fix error code in qca_read_fw_build_info() Message-ID: References: <515be96c-4c44-44d5-891f-fe57275e9f47@moroto.mountain> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <515be96c-4c44-44d5-891f-fe57275e9f47@moroto.mountain> On Sat, May 04, 2024 at 02:25:43PM +0300, Dan Carpenter wrote: > Return -ENOMEM on allocation failure. Don't return success. Thanks, Dan. Fortunately this error path is never taken due to the small allocation size, but if it were it would only lead to a debugfs attribute holding the fw build id not being created. That said, it should still be fixed of course even this can wait for 6.10-rc1. > Fixes: cfc2a7747108 ("Bluetooth: qca: fix info leak when fetching fw build id") This one should also have a matching: Cc: stable@vger.kernel.org # 5.12 > Signed-off-by: Dan Carpenter Reviewed-by: Johan Hovold > @@ -136,8 +136,10 @@ static int qca_read_fw_build_info(struct hci_dev *hdev) > } > > build_label = kstrndup(&edl->data[1], build_lbl_len, GFP_KERNEL); > - if (!build_label) > + if (!build_label) { > + err = -ENOMEM; > goto out; > + } > > hci_set_fw_info(hdev, "%s", build_label); Johan