From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 750E839D6C6 for ; Thu, 30 Apr 2026 23:13:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777590798; cv=none; b=e4+Tn3X7RrhM1oS4D2im0Ay9/37qHIS8lfdky/O3FCC14kUNCEhRR9mQ9wqvDRCoXLKabMbyDFnfE2ap3MlD9tzoqgh/jzpO7Cdb65H1QwIsnBbfsEE4HpA4+130SMb6slwTzJYRxCbbDRuLS52QwzrEYDTG30EplkIa71U2nw0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777590798; c=relaxed/simple; bh=dY1HY9JIF8+lDEBooYfgHkN/XI0e+4h8UH4v6feKDu0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eXPxnDOHlADs6LqcYP3d7iNSH1NcQey/knnLR+Qxtr9GmTArp+VEWHVromfk/334PFavnHfY8gJfxJ9OQRYC3y7RZur6lwisx0aV41DBLd0oZnxChCw0gwBUkH0P7xNpDuK+3ULoHnzPtpCndj6vpjUhjj7sdAfqp65xOjD/0pI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=deAKfLGx; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net 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="deAKfLGx" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-82f33d28c1dso878513b3a.3 for ; Thu, 30 Apr 2026 16:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777590797; x=1778195597; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=QRfJ91dKSszpfdR8DuR6IPrBqkdsGBVokk2DQ9C/ack=; b=deAKfLGxEtEG1PYHmc5nu+2bHX+LiDVHMNYQ+CNhzCxcf6rkUxP+lB3BUP28pw8pTV fj7bpONtsf1pmC+8iTN40RZrjK2a8+nYwjoESeJUiJdDbiuoIsRclWPH7tCOB/44RYoJ Qx8jmPwrgSgwKUk8v67IAVaD9ZMrlZ4JF3Tzot30fVwynxxWRCizXka+Ofj8tUsi+qNA 5JLh+uIR62xxEv/qsybFBW1ZyX0t/Cu5CmU+dfx+HKVpipi5UMrHGgTO/NUj/gB4pmpN kqM/QXUKC4ADyMQnozXKTbxjoH+hmz7NDLOoNUZSJvuuOZYEghzwUl8Plxe6cyVSah3A 6b9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777590797; x=1778195597; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=QRfJ91dKSszpfdR8DuR6IPrBqkdsGBVokk2DQ9C/ack=; b=egXkVubjq2VjoH9EcVzdtCkiFd0AaHfxKO+bT/jeX0qc5+5zWTuuGowzj9SFKvbJy9 LYQj+xqJrYcwKmkl63m0xgNztQ+dYZL6zrfsG1sbQy+O3Uat1+NwC0DC2qbOqDKxs8Lz 9Wk8aoKM0PGDcFdAs22l+RV6QAC9JVbH+/fcBZVC6qu2b49GgehWFL220NHXv6e7sLoR H0HIdudT0zd/sPPFRBMejS+B2EtTgQ7CImZc/8c74N3RdScbrt+M9jsJegvQggFjCute YPktfc+Ad4epAi8dQi5Y7+WYRI2CZj40wMCVFWSdGOVK/2NPDipxQDFZ4EohS/SanjKc 23WQ== X-Forwarded-Encrypted: i=1; AFNElJ/i7ckAJTFmyHshITfv203vNcm11esijZOdpUtLwoPN38TQM9RELjc2SI7nFhnrdc3KmZ0CXUal0eQEEZ0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywow6rQFuP7HTk8U/38Kq3WemBee4tLUkGCt/VhBylOK4sQwq2R oIUnZRiaLWFjitvnnUxBZhi9AiIlqO/s5XG+PZmWT00sT9ve5U76kRhJ X-Gm-Gg: AeBDieswBYkKL6ajgEE/pS5Zpci9sB/xaoJ5JrVVd1SHFOUEKfnOf7+A9qP5eas3WzQ mVPaijDC/ZMHwTLJPP1+0MQETuAiXG3RdbFVDzAOrIZBpp5FL0jvxzZzdV3uc+CGbg5PdnjMAlF qBYvoe06y7IKtoSU2Iv1DpmskIZY4VzU4tV+tlc3rXSl5KWPhjU7CAmpIBj+CO5XTmiCxhGgZ+b 2yUo7H8zhQBINzDPH04RWwkLOblKhinuSxUTpc9xW6yQcuJc5qdiWrRAFwpgQTsCfFmFRB40b9p 9EMjUDRpA1eLkUrKnt53vt8JdCVRLk7i2tC178n+vCaspufaexNheocBzGgHDEvdxzrBVIK48op rDzDPnSTB4v+Rpmv82R6cBYW7PPJzmEveUSXMlHt5Gls59F7qfE4k3ag2aW6XF5P/rkT/DlRkxz BTy5ec9C8BlefESbTVif0WQABCFGezg3UXrswIMhtLB51j5L4= X-Received: by 2002:a05:6a00:430c:b0:82f:5576:2853 with SMTP id d2e1a72fcca58-8351a59ca27mr541087b3a.30.1777590796764; Thu, 30 Apr 2026 16:13:16 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83515ad0049sm787335b3a.33.2026.04.30.16.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 16:13:16 -0700 (PDT) Sender: Guenter Roeck Date: Thu, 30 Apr 2026 16:13:15 -0700 From: Guenter Roeck To: florin.leotescu@oss.nxp.com Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Shych , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, daniel.baluta@nxp.com, viorel.suman@nxp.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, festevam@gmail.com, Florin Leotescu Subject: Re: [PATCH v7 1/3] hwmon: emc2305: Fix fan channel index handling Message-ID: <2bce6b65-d09b-4237-be0f-3b53698d8031@roeck-us.net> References: <20260429065955.2113012-1-florin.leotescu@oss.nxp.com> <20260429065955.2113012-2-florin.leotescu@oss.nxp.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=us-ascii Content-Disposition: inline In-Reply-To: <20260429065955.2113012-2-florin.leotescu@oss.nxp.com> On Wed, Apr 29, 2026 at 09:59:53AM +0300, florin.leotescu@oss.nxp.com wrote: > From: Florin Leotescu > > The fan channel index is used to access per-channel data structures. > Validate the index against the number of available channels > before use to prevent out-of-bounds access if an invalid > value is provided. > > The thermal registration path currently uses a sequential child index, > which may not match the validated channel from DT. Use the DT "reg" > property when registering cooling devices to ensure consistent > channel handling > > Signed-off-by: Florin Leotescu The problems found by Sashiko are real, but they are pre-existing. The locking issues are pre-existing, and data->pwm_separate is for all practical purposes always false (there is no upstream user of the platform data, so it may well be removed), meaning there is no separation of pwm channels if the thermal subsystem is enabled. Given that, applied. Thanks, Guenter