Re: [PATCH AUTOSEL 5.18 03/68] iio: st_sensors: Add a local lock for protecting odr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 08, 2022 at 10:26:51AM +0100, Jonathan Cameron wrote:
On Tue,  7 Jun 2022 13:47:29 -0400
Sasha Levin <sashal@xxxxxxxxxx> wrote:

From: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

[ Upstream commit 474010127e2505fc463236470908e1ff5ddb3578 ]

Right now the (framework) mlock lock is (ab)used for multiple purposes:
1- protecting concurrent accesses over the odr local cache
2- avoid changing samplig frequency whilst buffer is running

Let's start by handling situation #1 with a local lock.

Suggested-by: Jonathan Cameron <jic23@xxxxxxxxxx>
Cc: Denis Ciocca <denis.ciocca@xxxxxx>
Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Link: https://lore.kernel.org/r/20220207143840.707510-7-miquel.raynal@xxxxxxxxxxx
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

Hi Sasha,

This one is a cleanup rather than a fix. It's part of a long term move to stop
drivers using an internal lock (which works, but limits our ability to
change the core code).  No problem backporting it if it makes
taking some other fix easier, but I'm not immediately seeing such a patch.

Yup, it's not a dependency. I'll drop it.

--
Thanks,
Sasha



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux