From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (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 9AAFB3128A3 for ; Wed, 10 Jun 2026 12:19:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781093962; cv=none; b=AcrDTQfkxr3ogXbl1fjUSbwjMc4GGZ97URjFnDy9QKHpdN/JVxpG6wfosLtzinjpFap621ghzejuJbaio45WH86b7Vx4CawG/MRzELt7Msj5CxZyJEF3wiRzuXKSt6r+v1q/5FwYAyzPWf/S7aZJoGvk2MOMGpQv9C8Vm589amw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781093962; c=relaxed/simple; bh=zxYJs+l4vwEP1WsqTw7YX4PmfhSmZk3Nu7mRqrVorus=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XotDmc/gn6Lnzox9UJ+Dn+tjrsjC2HpvgWSH2mclK5YSJ/KjPDjKbpBzdkg8xkkOsFL2xQdCh2xcwvW4g7OD7gEaK0tt+YShcOaRPGM5+598haYqrGmAHoaqhQ2A+vFKOJftX/qfV8GLkubk2NMmDci5+QDfMxHyLBzerZqeBRM= 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=bZjzbMbs; arc=none smtp.client-ip=209.85.219.52 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="bZjzbMbs" Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-8ccf887de87so76559306d6.0 for ; Wed, 10 Jun 2026 05:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781093960; x=1781698760; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GX8so8D0LdsxLyGx+h3I0h7Z/PH7ZZYi77dt1OsmmTU=; b=bZjzbMbsL2upz4g3Q8tnYU/piqtm12xzjhtoaMnfuwn7xF60673QjBt/tCx7YuS2Dy CpEHRkhcKf8ODGN6Cf8nOWJMNbIhEyJwxCdR6RvAwLnH5R1QNZivbL6budXcJmrWzKZu XVzyZ0O20l0mfEWgui6ovCYVb4b+InM3L/qPDb7PjpYxcFk8q543AdxsJcNnrzyLMynB DU5UIiIIeiID7UbcBnSZOYuLvKUkFJVdw0mfDwBBNit01dbFVWTV6Pvnoe/0b+XFRNrF gdo/fcy5FxfSACzwrjceDAMYsrVKdr208+hkNeFX4MGYVqhiYOFIKiwCEGGIg+Uww+Pq lYyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781093960; x=1781698760; h=in-reply-to: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=GX8so8D0LdsxLyGx+h3I0h7Z/PH7ZZYi77dt1OsmmTU=; b=elilw4q9C/nrhSklUJ579AoMQOV5Ox3BPdJf/0nioYFY4yO1h+dX6hx+HUTLXQOBIJ 46OvBPcBavMGRQVprMtL6YXQ53Rg9HMizjP02moiNiI7wkjZSYYdaC2+fwkZxCHnQbPP sVXW7+WzVbolOeKeKT1ZtqDSL9QqgoTOPD+XftlL3A1YJrhUBkN3Krt4HRGAy9NBQcif sfAHcXGgzDsk5IGESmanP0SqUbU8GkqlgxIVOqtP5ZDvzmCeSaqiTgfA15cGtKmeSJeF MWF2HlxBxOseuDWrKIvy147osrcyKUBX6ZIJ6JXgAmGpf/OxjrmjApUym6mAQGGaCktj 3DHA== X-Forwarded-Encrypted: i=1; AFNElJ8Obb9D5k7eWycwXTXEWF8TJPwnbuSVxO3cNIkjvYkAkTbsQ7b8z1giPM7KuEYZDglXXyVuUGy6sCMdaKc=@vger.kernel.org X-Gm-Message-State: AOJu0YzYzTfZCoFrkdc8W5SVKqRXsMjJYU3Wk4ZuCqt0GbzRP2S29/pw 5gtCskws16VIzfobTwz0f1ShGEn3z/maC2jFOTB0xgXmEOzPyCKIVrM1 X-Gm-Gg: Acq92OEFfBXj2Yf8iyX4DYlQzyoSP8+/mKwfT0NnLVrDM9n8PidjCIZlmpVleR44Cnh FUDiqcr8RzCgdovq98M4pbIY802IC3RrWlWaZk0Ncdpx0fTFU5ABEz3/4474KQIw72OsfwUnA8x IsTRrBD+YJa/hZR85h6hM84Ew+1DrL5ITrJ69/APhgCH7aMMY4YZ+LsviQhvVjlzfcuNwuqaBlM x0JIz7H/vKFexroalrmr3toinCy7qnCLuBo8+tqK6G8IYKGbl6IwvCVdUCYOKxx3jDYaqXe1CTk BUHB9nsQ5uy6pBqKw1hqYP/CaIZUhqhH1TZsjN8vwwJfJHSGcYljaCHwMqQdKDV0NDsTVz0X/S0 3CS/brTn5/JxFw9sgKx3ZZkvuz/AExCtL3wb8yBjQG8zqzurJx5FyWFIUromFFK0dJR/sOURqrK Yc7SDEZGyeq/u8MwyjEMJfbzw4PKir X-Received: by 2002:ad4:52c7:0:b0:8ac:a6bd:503b with SMTP id 6a1803df08f44-8cee5fed5damr322934136d6.15.1781093960602; Wed, 10 Jun 2026 05:19:20 -0700 (PDT) Received: from localhost ([43.225.189.119]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ceccdb9bd6sm258065746d6.13.2026.06.10.05.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 05:19:18 -0700 (PDT) Date: Wed, 10 Jun 2026 15:19:11 +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: 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: On Wed, Jun 10, 2026 at 01:41:49PM +0300, Andy Shevchenko wrote: > On Tue, Jun 09, 2026 at 09:19:54AM +0300, Dan Carpenter wrote: > > On Fri, Jun 05, 2026 at 11:28:18AM +0300, Andy Shevchenko wrote: > > > On Fri, Jun 05, 2026 at 09:12:38AM +0300, Dan Carpenter wrote: > > > > On Thu, Jun 04, 2026 at 05:55:08PM +0300, Andy Shevchenko wrote: > > > > > On Thu, Jun 04, 2026 at 01:42:11PM +0300, Dan Carpenter wrote: > > > > > > On Thu, Jun 04, 2026 at 01:38:50PM +0300, Dan Carpenter wrote: > > > > > > > 168 ret = sscanf(buf, "%i %i", &back->cached_reg_addr, &val); > > > > > > > ^^^ > > > > > > > Uninitialized variable. > > > > > > > > > > > > s/variable/data/. > > > > > > > > > > With what I asked in the previous reply and what you explained there > > > > > (thanks, btw!) I still think your patches are not fully correct. They > > > > > will require to atomically write all or nothing. If we want support > > > > > partial writes we need to go with that differently (reset ppos when > > > > > we got enough or more than enough data). > > > > > > > > Requiring writes to syfs and debugfs be atomic is pretty normal and > > > > works well in practice. These are very small writes. > > > > > > Perhaps. In any case your patch will break existing partial writes, right? > > > > partial writes never worked > > I don't get this. Does it mean it never worked at all, or in this particular case? > Also "never worked" means the same issue you pointed out (uninitialised buffer) or > something else? I mean in this case. The patch doesn't introduce a regression because partial writes were already broken. regards, dan carpenter