Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CBE392F8BEE for ; Sun, 14 Jun 2026 06:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781417128; cv=none; b=pZLAeJdjZtKLJ4DYdLSIgsqySAfxPYRC2BVRtmssExt1A0kV3ICR9Jj8umM3/xu/90EezQB1Bmh1Nk9L34+ilGWeyZytDbve5zeL4dRKGscw0P3N/3rgcoXJnffomQ3CdrKUbQEFkOX3dGw6EJ3pP8pHr2EaSGlQkK6ELlYyuNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781417128; c=relaxed/simple; bh=gvPH2m2bpfs736TmBIlRgt05ivgUlpwq1DSs9g9/Py4=; h=Subject:To:From:Date:Message-ID:MIME-Version:Content-Type; b=B8uLQD/e5KrL0Nso0SUxp5SaKy1ac8bvCAPu7ukpHQqLD+BusgcOtUSIt7aTl5N/CiZbn6gYdeLLCBTjh9LmJLm1BqQjxXNTQgcRFDZ+QovcOtvZDeASGraioiSQT3KzJvz1lNYBTDlutek0U3/1zDUgXie7tYlEsb+Tx+MxU+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ry5yCXa4; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ry5yCXa4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C59411F000E9; Sun, 14 Jun 2026 06:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781417127; bh=6Vm0S+sYacDpI7hTSAw2J/foEwrGLFXf59pGDM/aU9A=; h=Subject:To:From:Date; b=ry5yCXa4FUFw91kSB6RA9yYp6XSF45K+brY6kOu/mKA3XgXkPCo8EPiX9Vhi0ErxM YcyNee6r23+5PqDdO8xLF7ChxRqLwFfkbHIMG/9x2cHG4UPFbAJcZhe0i1jCuKmVvk vH1GijOzQOqcR2Rolgpsqtf3NbP0y+MYq3vj7gKY= Subject: patch "iio: dac: ad3552r-hs: fix uninitialized data ni" added to char-misc-next To: error27@gmail.com,Stable@vger.kernel.org,adureghello@baylibre.com,jic23@kernel.org From: Date: Sun, 14 Jun 2026 08:03:38 +0200 Message-ID: <2026061438-robust-truffle-5795@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: dac: ad3552r-hs: fix uninitialized data ni 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-next 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 also be merged in the next major kernel release during the merge window. If you have any questions about this process, please let me know. From eaaa7eef181892ef7ba56c6295b81f0ae4492c13 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 25 May 2026 10:15:46 +0300 Subject: iio: dac: ad3552r-hs: fix uninitialized data ni ad3552r_hs_write_data_source() If the *ppos value is non-zero then the simple_write_to_buffer() function won't initialized the start of the buf[] buffer. Non-zero values for *ppos won't work here generally, so just test for them and return -ENOSPC at the start of the function. Fixes: b1c5d68ea66e ("iio: dac: ad3552r-hs: add support for internal ramp") Signed-off-by: Dan Carpenter Reviewed-by: Angelo Dureghello Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/dac/ad3552r-hs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad3552r-hs.c b/drivers/iio/dac/ad3552r-hs.c index a9578afa7015..6bc64f53bce9 100644 --- a/drivers/iio/dac/ad3552r-hs.c +++ b/drivers/iio/dac/ad3552r-hs.c @@ -549,7 +549,7 @@ static ssize_t ad3552r_hs_write_data_source(struct file *f, guard(mutex)(&st->lock); - if (count >= sizeof(buf)) + if (*ppos != 0 || count >= sizeof(buf)) return -ENOSPC; ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, userbuf, -- 2.54.0