From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91D3B286898 for ; Fri, 5 Sep 2025 12:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757075203; cv=none; b=ioSOsEwOpyIRxRdgkkyvq/P2K1nve9XlQRYHbg1XG2anAjMbHY2v7jnYt87KC5dRsEhrDUU6e7JXkRC6AzFcpm84H0VaSlcFu5hJjziadtWN+YQ+TOiu/s7Sp+TJTmvcJ79KRh+19lmZI5HFMB6wBMNLM9IL9P/TCqX6sf0xZpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757075203; c=relaxed/simple; bh=yi5iDY/CaKimjYvqKYhiF0y+agbmmVD8KiB2arAoyuc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cH2VWE7k23phEVdRvDWWqzcWaG5oHsaUnHmmaBw+7yPOgMZSctmpEtMpDzAAt1ND+oPB8Fc8gtlySF7efTndi5R9UJsSD3XV299sbsHN+KNTKWKqj8ydqpSiMY70kItJEKGZEAOq9IfLx0uDy/sz2IGz7M08tWG8lokv/z0813A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B3369153B; Fri, 5 Sep 2025 05:26:32 -0700 (PDT) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 976693F63F; Fri, 5 Sep 2025 05:26:39 -0700 (PDT) From: Suzuki K Poulose To: Mike Leach , James Clark , Anshuman Khandual , Alexander Shishkin , Greg Kroah-Hartman , Leo Yan Cc: Suzuki K Poulose , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tamas Zsoldos Subject: Re: [PATCH v2] coresight: trbe: Return NULL pointer for allocation failures Date: Fri, 5 Sep 2025 13:26:30 +0100 Message-ID: <175707517468.1603863.4031069288262415474.b4-ty@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250904-cs_etm_auxsetup_fix_error_handling-v2-1-a502d0bafb95@arm.com> References: <20250904-cs_etm_auxsetup_fix_error_handling-v2-1-a502d0bafb95@arm.com> 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: 8bit On Thu, 04 Sep 2025 15:13:52 +0100, Leo Yan wrote: > When the TRBE driver fails to allocate a buffer, it currently returns > the error code "-ENOMEM". However, the caller etm_setup_aux() only > checks for a NULL pointer, so it misses the error. As a result, the > driver continues and eventually causes a kernel panic. > > Fix this by returning a NULL pointer from arm_trbe_alloc_buffer() on > allocation failures. This allows that the callers can properly handle > the failure. > > [...] Applied, thanks! [1/1] coresight: trbe: Return NULL pointer for allocation failures https://git.kernel.org/coresight/c/811e07b1812a Best regards, -- Suzuki K Poulose