]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: zynqmp: Take the phy mutex in xlate
authorSean Anderson <sean.anderson@linux.dev>
Fri, 28 Jun 2024 20:55:39 +0000 (16:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:35 +0000 (11:11 +0200)
commit8bdbc44c6d2638bccbe33d075ad80a4f8f701893
tree6a9bea4e47c188e70fb783e68a890b62105c9c67
parent441e6f5829beb77a8c8e11e9693cf0154b88b0aa
phy: zynqmp: Take the phy mutex in xlate

[ Upstream commit d79c6840917097285e03a49f709321f5fb972750 ]

Take the phy mutex in xlate to protect against concurrent
modification/access to gtr_phy. This does not typically cause any
issues, since in most systems the phys are only xlated once and
thereafter accessed with the phy API (which takes the locks). However,
we are about to allow userspace to access phys for debugging, so it's
important to avoid any data races.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240628205540.3098010-5-sean.anderson@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/xilinx/phy-zynqmp.c