From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 1C2C934EF05 for ; Fri, 21 Aug 2026 05:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787289109; cv=none; b=OhsThznYmeEEGNFzqqxYYVBD6ktZ/F7qUGyCawpffVlN7tcaDGRE0l6Yp4Ctypqb3KBjs6f1tc3gpCNJAZeuP9/14P7CVwRBznr4iMLrvyDPf6HrlwDZGJcNadCD6xE6lA5eacQskVyYSKhw5FHDpYKOqozgckwK7nUaWQGrpWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787289109; c=relaxed/simple; bh=bZvVQSnxR76iI7o1poNB53jNw7lo8Y9/UFOYVBgoxug=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CWvr/olBMKujTNl9dhhaPIfs11/XeZ8rZ2vTrWFAqJiGtZ43kSsCdfiKx6izJVEve0ePM9K1+ZuINNVXraLpnK46735amNFWarYmyNpTim8pGEixCJTsQefQgoFQMbLKrFC1ZxPY3UwMZHn5s/SvFGIQ/UGKbl12SVGJZMLExaQ= 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=CyTY5s0p; arc=none smtp.client-ip=209.85.215.171 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="CyTY5s0p" Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-cc11a30a259so638733a12.3 for ; Thu, 20 Aug 2026 22:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787289107; x=1787893907; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to:content-type; bh=Q7qYNBjYJTarZ0aCh0RmYHP1Sy0FJpXklQmt60ZqlDw=; b=CyTY5s0pbXK/XCdmtBxgUUEOY8obD+KVs0SF5sGwZBcuLBa/nCAZgq97s4flDv8LiX Z4BzCrwha9V4h9ad2JJuEtbYg4qvQ1JLCADzP3kKUKT2r1hbI46lxWfKS+xaIdU+5gQR AMaD3TrTKQ4a8nVTqFlVbmz5gI3heluBnGT4DeD9NekVQlwcZlL6z/u/efcy5yJrUpX8 ANyYmAzcb4FzZAHbABdLV/LKLEoZOO8DcABJwGOWB3j+K/eGtjO5cUiT7za2oKywBvk3 WinfaLL1iQLxwyDLenNjtoPL1vduUT3U0GrxBsMs8dGz29VxkzZiVcvsMOYJ6g0xr1kn ZjMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787289107; x=1787893907; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=Q7qYNBjYJTarZ0aCh0RmYHP1Sy0FJpXklQmt60ZqlDw=; b=SbfAF2A2XzMBtI/P9oMatWoLE4sHopBLCl8gPV24upxbRk57k44Ndn92mQnGJ5xwNq rM3/P2ylk69S0a2ubz4iKyL6GVfP46xG2j2lJLAZlCayX+V1NuA8fVRnVbanFgWOKpP4 F1WbQUxLR9UvbsqdPMV5b+Rmms1a3uBeLDBU8xYHBkbyp8aeYcpkEYMXWH83eZKrM2Pv wsI5m0X5UFyyf/FMMxOiZpJ5wtrN5elru/mhYXcUM0mcjrsR338/2QvM/dOAGZI3f1XP C7Woy9VEr6PNzZNcKJ8caS1GjHi3PO212i+oDbbkHW+HJTUXnYE9xP2A1yLAhnf2AN48 5zrQ== X-Forwarded-Encrypted: i=1; AHgh+Rpf3sz0pZ/2gCYmVR5RISxeW+jOAgJGNYuUECUDQ5CdbFoY+bdXy79FdXbGPRffaX4l9J2qIg27KYEK1L0=@vger.kernel.org X-Gm-Message-State: AOJu0YycptZ9PSf+hkl20M4SPZnwqeIAnOfEe3QdAioztzWzmA1SRR9d jtwDLoJss58uEwmm6hiD3m4TF6+GyNaPu1QMrFRQ40URhyQku36sz4Em X-Gm-Gg: AR+sD12nclvmwZ79jZwjyPrKIwaJ3a+BbnQ9zaB/BkzNH2shCoPWihva3dBAn6piRYv 8l+Gn7pRerFUFFm7taK9hIy6qx5mgnYjWHkCA4d2Hutnld68FKrXb2jpzJvrVPrdNmQ4hX6MVPg 5P1mFywaNOgg91KgR7yq13STemIEREPFjVqZUccUnhNf4GD7yWvlF5mC+zxGVvZTSRm+5Oow8VB Pv6Hty+d/DHHRG8IqGoXbkA34/V85pgTIR40L5hVi0/wCy0XzTG3ToOdRGToSKMZcq9NUBBHoW1 5BfmSd5E4XRg9V6uZeJreIGi0ck2nLGuglZN8INuTNEzy7NFdJr1b+vAv+SE4XwQA1Qz6BlU4I3 Ve88dy8x52omHEw5uoW1G7b/z7xH+weUUr+RLkJmAFtsesS644YtXLuEgMrTTWBOoZCOX2TE9kX IpWvWCpZdnh4IasK+v4h0KNIUJ7GOQmMR0PYYYMpRnw4sVfl1+aLDK+PzrpVsHJEjbCKse0BSjm w== X-Received: by 2002:a05:6a20:3d82:b0:3c3:89cf:f3a with SMTP id adf61e73a8af0-3cd2fd7c560mr5992089637.5.1787289107327; Thu, 20 Aug 2026 22:11:47 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-327bf175399sm39220834eec.26.2026.08.20.22.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 22:11:46 -0700 (PDT) Sender: Guenter Roeck Date: Thu, 20 Aug 2026 22:11:45 -0700 From: Guenter Roeck To: Jared Kangas Cc: Tzung-Bi Shih , Lothar Felten , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Sashiko Subject: Re: [PATCH v2 1/4] hwmon: (ina2xx) Acquire hwmon_lock in shunt_resistor_show() Message-ID: References: <20260820-upstream-ina2xx-in0-curr1-alarms-v2-0-fdce35abc41e@redhat.com> <20260820-upstream-ina2xx-in0-curr1-alarms-v2-1-fdce35abc41e@redhat.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: <20260820-upstream-ina2xx-in0-curr1-alarms-v2-1-fdce35abc41e@redhat.com> On Thu, Aug 20, 2026 at 06:09:21AM -0700, Jared Kangas wrote: > shunt_resistor_store() currently acquires hwmon_lock to set > data->rshunt, but the corresponding access in shunt_resistor_show() is > unprotected. Acquire the lock in shunt_resistor_show() as well to ensure > proper synchronization. > > Fixes: 3ad867001c91 ("hwmon: (ina2xx) fix sysfs shunt resistor read access") > Reported-by: Sashiko > Closes: https://lore.kernel.org/all/20260729162836.89BDF1F00A3A@smtp.kernel.org/ > Signed-off-by: Jared Kangas Applied. Thanks, Guenter