Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp704319ybi; Fri, 7 Jun 2019 15:40:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwm5lSMNMOPuX5skenoZ3AwixXatVVQEWNUZ7fbaJQgiYyUbhkT+rGKpqvEeMu6uWA2gNnh X-Received: by 2002:a62:b50c:: with SMTP id y12mr54434490pfe.171.1559947246016; Fri, 07 Jun 2019 15:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559947246; cv=none; d=google.com; s=arc-20160816; b=SJrd/4+lf0kb6h/4QxmyL5CWpAAZRsWG5HhdqLhhZ9F9MlJHeTx92u/Z/tuVKBIdgz jlwvnMFwy+v4EGLx0xZIQgClT2e7LywHgubdVNthPY+HLAeX9FTDgKga6tV1z+oql5vn K0QFaIsSxn5xh0KDFVqSYHhVZbXzkUrmPKhSxVqMtddSS5NhPVn4icxw+oWYZTBfZVsP 9LL74wwBa6oyOGLx2Cl2E9UlNoYQxKjRtRu8Uyf5ktYn2KF7Rk7wF5yzz5dtvFJ3P83U 5PNzKdMzDC/CJdZgbuA98eClNvY2KTr558e976DdeEeqZjFYeFV5cfvRrsAzMceHvLNy hC6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QSZzuR9CvzVzvH2AaIkz6m5iJip0AfTYqmcnRrA3WcQ=; b=cBDt+abQv+apMat38CKArp0w/YsljN/zwb4P0goCYf0ptHdgA1ikowMxd9ZajjNzXc eHDkrnI3BWPii0crsoEzwUiWyRHOCc3gha0eOatIjtQgkjiWwKc0AvwsYpcstPUFZKF5 e7SHzy6e8chkDcpjjP7xl1XylviYMHAdODaZ6N7zNEIC3cEupArLpv4ERQ9cWBpRkeJN CEZbAbqXuhgTzq6B5Osvo/eNVvV0raDdtfgdoJEdwShcsrq3AdjIZxMb325kpXxsJcU3 Qr+2qubH/JutzbrLlS0ohr9rO05aWQkFsPm0Y0nun1HtsPmX2gRCozmmrfsv1XrrBHUY EOmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si3132234pgk.442.2019.06.07.15.40.30; Fri, 07 Jun 2019 15:40:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731674AbfFGWcU (ORCPT + 99 others); Fri, 7 Jun 2019 18:32:20 -0400 Received: from sauhun.de ([88.99.104.3]:46592 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728749AbfFGWcU (ORCPT ); Fri, 7 Jun 2019 18:32:20 -0400 Received: from localhost (p5486CE26.dip0.t-ipconnect.de [84.134.206.38]) by pokefinder.org (Postfix) with ESMTPSA id 65C593E43BA; Sat, 8 Jun 2019 00:32:18 +0200 (CEST) Date: Sat, 8 Jun 2019 00:32:18 +0200 From: Wolfram Sang To: "Adamski, Krzysztof (Nokia - PL/Wroclaw)" Cc: "linux-kernel@vger.kernel.org" , "linux-i2c@vger.kernel.org" Subject: Re: [PATCH] hwmon: pmbus: protect read-modify-write with lock Message-ID: <20190607223217.GE869@kunai> References: <20190528090746.GA31184@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HnQK338I3UIa/qiP" Content-Disposition: inline In-Reply-To: <20190528090746.GA31184@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HnQK338I3UIa/qiP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 28, 2019 at 09:08:21AM +0000, Adamski, Krzysztof (Nokia - PL/Wr= oclaw) wrote: > The operation done in the pmbus_update_fan() function is a > read-modify-write operation but it lacks any kind of lock protection > which may cause problems if run more than once simultaneously. This > patch uses an existing update_lock mutex to fix this problem. >=20 > Signed-off-by: Krzysztof Adamski Please use get_maintainer to find the people responsible for this file. It is not my realm. > +out: > + mutex_lock(&data->update_lock); Despite the above, have you tested the code? This likely should be mutex_unlock? --HnQK338I3UIa/qiP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlz65fEACgkQFA3kzBSg KbYJ0w//UZ891A5ERJxc0KfiTONdubv82Tq6XlgvMzF6NBLXovXj4QGY/Cai1j+u d4yIv6YReQoS4Zsd5hNKoQk2vTtI7TF2yCTWjffQWRvXyOppQ8vmoAOlxUsCV4lU UJAotgCnlwo4KZKjKEAYMv0X5cbwByWcswyz8W3ZAKEVfVePw3EiAj37EO2bfRXw QG66Y8jBPzphQU0BzxZxq5xlv+tYJnE804uXnOrqqxDaKA2jo8lyEO7iRPrTSOP0 UvA19GIA5Tgw5wLLfHxRR+Ewday9+hcAr1pWhpqYKrZvJadXJgZ4wVVOql9RNkMe PEJe5aGxPCvgvc1nRe3lN49iGE/lKAOA6zA5RJPfmXf46S4lQGi+tDX46hWzxNh7 SKM5Fkc+ieWs1Z1BidMlDmYvXwdeCALFcbMo6/HBdeXkOob4Y1j4PrOysCd936u3 Kv8zSvw2z0qbd/2mdqjanFzIGABXPZAuS65cs8yci9P6pLdyu2siBIEDIKUf2HDm OI8TBwu6y1DwER2EW8l07njzo5CzvTWanYwBi2sh7pJsCxGKGaszFni82C+pNPOh pvdmoKp9RI+nWZ5fLDIiq7TQk5mPmVspw4zKlqB48MgVAUrH163NPWyoJSeGyBd5 om4tv4lmJTWx5no5UPg1oj7U6hJojFoFpyg0tE48bfIFCUE+uLM= =6s6f -----END PGP SIGNATURE----- --HnQK338I3UIa/qiP--