From mboxrd@z Thu Jan 1 00:00:00 1970 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 CFA22332EA0 for ; Thu, 26 Feb 2026 23:52:49 +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=1772149969; cv=none; b=ia0J88FgXP/E0sS3kLscJqK0h+Dur6yPbTBjXwO8APvFVR5FkVGx312Pbg28XRshMe1x2ZLl5cfr8t1vQHlLhVvfJ6mHsdnaXfeFPwiLKGYD22Csi8eUTSh+vQrjCsxzoXckUsauhLEfe7zSQJospJcy5mtJqWggkZWuMo4QodU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772149969; c=relaxed/simple; bh=SanP2XuHsxfKFZIhlKlDTCWxGQWQx1BzZU/w3kVD80g=; h=Subject:To:From:Date:Message-ID:MIME-Version:Content-Type; b=OocxX5Uy9lgUaNe7PjtHpcH8TyIr6a+lnblmEmso2YdOnmG310vfYpPbAkdBIgfRJGnTbVUVSs32mlGMU2okGCmdhWYgeHHVzl9uw6OVEhgLrpbxV4d1W35kldNPak2dgklUyP7fenlnBAtQLoINdv16pdu+Osty7u/siRJ6gtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Vp8pI9rl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Vp8pI9rl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93F2CC116C6; Thu, 26 Feb 2026 23:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772149969; bh=SanP2XuHsxfKFZIhlKlDTCWxGQWQx1BzZU/w3kVD80g=; h=Subject:To:From:Date:From; b=Vp8pI9rl6UVrJLif3dE93XeFQODlNH1vl/ahHwQllH5xAZh3CjqdTBj9GhAYCadDD yFuubH0H3BuJ+xtQDIiD2A029BuCqASFBsLDrNmS/D/VqWtJmjLVJSm4laMHrtMWeb DOBZvBclFWwH1I9JOvnxmjlN4uOxT9EQa0aUb99s= Subject: patch "iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas()" added to char-misc-linus To: antoniu.miclaus@analog.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org,andriy.shevchenko@intel.com,tduszyns@gmail.com From: Date: Thu, 26 Feb 2026 15:52:35 -0800 Message-ID: <2026022635-canon-engulf-ebca@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit This is a note to let you know that I've just added the patch titled iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas() to my char-misc git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git in the char-misc-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 216345f98cae7fcc84f49728c67478ac00321c87 Mon Sep 17 00:00:00 2001 From: Antoniu Miclaus Date: Thu, 12 Feb 2026 14:46:07 +0200 Subject: iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas() sizeof(num) evaluates to sizeof(size_t) (8 bytes on 64-bit) instead of the intended __be32 element size (4 bytes). Use sizeof(*meas) to correctly match the buffer element type. Fixes: 8f3f13085278 ("iio: sps30: separate core and interface specific code") Signed-off-by: Antoniu Miclaus Acked-by: Tomasz Duszynski Reviewed-by: Andy Shevchenko Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/chemical/sps30_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/chemical/sps30_i2c.c b/drivers/iio/chemical/sps30_i2c.c index f692c089d17b..c92f04990c34 100644 --- a/drivers/iio/chemical/sps30_i2c.c +++ b/drivers/iio/chemical/sps30_i2c.c @@ -171,7 +171,7 @@ static int sps30_i2c_read_meas(struct sps30_state *state, __be32 *meas, size_t n if (!sps30_i2c_meas_ready(state)) return -ETIMEDOUT; - return sps30_i2c_command(state, SPS30_I2C_READ_MEAS, NULL, 0, meas, sizeof(num) * num); + return sps30_i2c_command(state, SPS30_I2C_READ_MEAS, NULL, 0, meas, sizeof(*meas) * num); } static int sps30_i2c_clean_fan(struct sps30_state *state) -- 2.53.0