]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mailbox: Not protect module_put with spin_lock_irqsave
authorPeng Fan <peng.fan@nxp.com>
Fri, 11 Apr 2025 13:14:10 +0000 (21:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 13:57:32 +0000 (15:57 +0200)
commit852a2bda152aebee5f225a8827016559396e0b7e
treea32fae049ca0168f803abbf3f40886d977fd9d91
parent86be8c7409b7822d7ac61d991279a7e1dbd6d06d
mailbox: Not protect module_put with spin_lock_irqsave

[ Upstream commit dddbd233e67e792bb0a3f9694a4707e6be29b2c6 ]

&chan->lock is not supposed to protect 'chan->mbox'.
And in __mbox_bind_client, try_module_get is also not protected
by &chan->lock. So move module_put out of the lock protected
region.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/mailbox.c