From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 DDE7439768F for ; Thu, 4 Jun 2026 07:45:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780559145; cv=none; b=fiFyWYzDaVNX15ctmqjQv/Fsx9gmJlfdP73pEyjJuUKdR8aL5TaXW2hcG1ta6XFM+FydvL9yvYFZTsalx4xzAVR19cUD+snPAwlJrfcIBc4v2AHX+VHq28B8TjxPy67QQRR0bXGFLaBXa/aaUhlSlyio6LAJuNwld0zd4bSgBIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780559145; c=relaxed/simple; bh=Dvt4W+Qy7EAGh0/2wIo3vsZYTtfKVjQbzzmSzWu1jsM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tS0Dgpqpi7wzS52YitF2NvdWjb3mVndPCRMSh9t6XHWlF0sAibbEYPN1JVIW0JT9Xzi7PSQnMlJgfZwMrM0YsmI85M3RQxxPbOo5FJs9M5NuQRXS2SOrfdWG2Hs1ArOuqdrWT2gPtOT4G3f1R9WUPczgufN80zLQFypa/UcvkzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CAgspFg+; arc=none smtp.client-ip=209.85.222.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com 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="CAgspFg+" Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-9155183b42cso54268085a.0 for ; Thu, 04 Jun 2026 00:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780559143; x=1781163943; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=kLeYQqRXlh1qJ/lyjnFUyj/UDElKHE/qIYm+8ZoOG5E=; b=CAgspFg+mqJL2ubJwFPUAhGcHpHcMNEjz8m3kWH6q7daXlPAbGkmoRNg/MXFU7vrVn P8KH5RtGSCJxWo8Q9Yus6dAE6ZBDz37jOHjiVNdQ4SyR7OzlDGk/baEfxP5qTJ7suR/s LAZ4eYSR2wSYkJE+rJ4Q8P8G7gFXvh9Glo5i0lB7vIZhwfvKMiX31Wg/1274RneIrzVD wl50l8diKtIrNYVwVrLE0l4kYNvmrNV3RxHebrBYeszYka5TenUp4u2gU+X6dXM/yf2A vKegx8MSSuvRMCOjm5+A6F3c30PuIbOfPWXSITWshde50j4+RD79tecBCkU6RgaIqBwG nmJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780559143; x=1781163943; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kLeYQqRXlh1qJ/lyjnFUyj/UDElKHE/qIYm+8ZoOG5E=; b=jcw0M2wmxN3WlsX9UkMarBQGedE4A5FfPKS3Fz3bTFaSfr1i1Kv7msuJ5Gjqfn1KNV BWYx6TAcqr3M1uo7UrZl34wwUQEYBNwzIASbw8EtHw7Xh7fQ5kpDRXyx4JXp1V1HNmfC WU4SG8NXbKJYDr7zfBDtvkNck3gJ5gC9beRiG63VHLwxyYjonQfaoHo7x0+6yZW3e1hT mRZ7/b/iaItG+oQy82ylBn0QLdnccu4sMzjKMOyNyZlN88IS3giLK0j6bqKy1tgbxaRZ GPpqGzuHtChVaBFB0XG8/TvrEx7miBitAQ6mgzjKLUBU5XB0Umy1PbOKiVvgcr0gJcFf Q9uQ== X-Forwarded-Encrypted: i=1; AFNElJ9PCUB/poRqX7ptpfKiTIzaKESY2WvSc8Upw8/k75ZotmsCI8jzRO5w7I8DxPY7wteKaWBU1MyWQb6hjqo=@vger.kernel.org X-Gm-Message-State: AOJu0YyASH7t7HMmp/yeRWOLO2WwxDAGB65a0taj9xbd9SUu6Cyr6AZx lEPvJtvV7wkt5fqj2QLDhrOhFYXU8B4eBxinKakPzsN4kPZdO5qnrgiv X-Gm-Gg: Acq92OEiC+K5JswTJTsAM9Fnu6Y1X+BSZUo3htUhLtqgR0KAvNOBW75dNK5+MmCVSs5 lDV+/nRw7I+W3l5smDlcNgm8igoO3bXJ17wdhG4L2GTrvqx0P62UxCn9pOT8ESFoyBVpnnh9eRl RtneqURUJL+4gdn25Aubv1hPCC7s4aKYDSP86rMz1S96WyuCyLgqcZtR9/EhUTRKqYTW19KKavS 6F3h6AFfLUAxnzc2BR/h1xOVK+SKkBvkKkoy/Kz1au987F3QHXt1qXvkODAVqIh1mUPZibBGaDL ri4KaEA4yPog16wemRpWO0vFESnc93lZzF4VdpWvD9v7rOc41cDoO7Y4m5bdXYv2Ks0tpzQKZa5 kUIe+MC0Vr2SkuiEqkaCiMA1iA34Xjhr93lRyjcT4bwuD+Tw7yqVUqghSB5LJJpX5rk8IkJNXSd nPUjGAL4Agy1kWgJs8wrx+xQ4sCJA= X-Received: by 2002:a05:620a:3727:b0:8cf:bad7:20c5 with SMTP id af79cd13be357-9159af5890cmr400348585a.25.1780559142818; Thu, 04 Jun 2026 00:45:42 -0700 (PDT) Received: from localhost ([149.40.50.195]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9158a37c4e6sm505365785a.26.2026.06.04.00.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2026 00:45:42 -0700 (PDT) Date: Thu, 4 Jun 2026 10:45:36 +0300 From: Dan Carpenter To: Andy Shevchenko Cc: Jonathan Cameron , Maxwell Doose , Nuno Sa , Olivier Moysan , David Lechner , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] iio: backend: fix uninitialized data in debugfs Message-ID: References: <20260526191946.409160c8@jic23-huawei> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jun 04, 2026 at 10:30:34AM +0300, Andy Shevchenko wrote: > On Tue, May 26, 2026 at 07:19:46PM +0100, Jonathan Cameron wrote: > > On Mon, 25 May 2026 08:20:31 -0500 > > Maxwell Doose wrote: > > > On Mon, May 25, 2026 at 2:17 AM Dan Carpenter wrote: > > > > > > > > If the *ppos value is non-zero then simple_write_to_buffer() will not > > > > initialize the start of the buf[] buffer. Non-zero ppos values aren't > > > > going to work at all. Check for that at the start of the function and > > > > return -EINVAL. > > > > > > Commit message is incorrect, it looks like you're returning -ENOSPC here... > > Tweaked and applied to the fixes-togreg branch of iio.git + marked for stable. > > I was stumbled over these patches by Dan. Since the file_operations for the code > in question do not define .llseek, the seek is not supported and will return > -ESPIPE. I'm not sure why we have these patches to begin with. Dan, can you > elaborate on the case where the *ppos is not 0, please? The simple_write_to_buffer() will update *ppos so partial writes are supported in that way. regards, dan carpenter