]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: mpsse: ensure worker is torn down
authorMary Strodl <mstrodl@csh.rit.edu>
Mon, 12 Jan 2026 17:44:39 +0000 (12:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:31 +0000 (16:35 +0100)
commit472d900c8bcac301ae0e40fdca7db799bd989ff5
tree409bfe5bc3096e75460a9152b205f887ab8db152
parent4374a1cac13e1b55a801d44bc9e3204395a252b2
gpio: mpsse: ensure worker is torn down

[ Upstream commit 179ef1127d7a4f09f0e741fa9f30b8a8e7886271 ]

When an IRQ worker is running, unplugging the device would cause a
crash. The sealevel hardware this driver was written for was not
hotpluggable, so I never realized it.

This change uses a spinlock to protect a list of workers, which
it tears down on disconnect.

Signed-off-by: Mary Strodl <mstrodl@csh.rit.edu>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20251014133530.3592716-3-mstrodl@csh.rit.edu
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Stable-dep-of: 1e876e5a0875 ("gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-mpsse.c