]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Fix device node validation for mailbox transport
authorCristian Marussi <cristian.marussi@arm.com>
Tue, 7 Mar 2023 16:23:24 +0000 (16:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:46 +0000 (11:16 +0200)
commit0447ede72d42ec2b38b1cc52bc32fcbbf93ffa27
treeff758d419e1ec1fee779d33e99757b7076d9383d
parent72250557e6e161547b1b4f7b5d114cd41bb07dbe
firmware: arm_scmi: Fix device node validation for mailbox transport

commit 2ab4f4018cb6b8010ca5002c3bdc37783b5d28c2 upstream.

When mailboxes are used as a transport it is possible to setup the SCMI
transport layer, depending on the underlying channels configuration, to use
one or two mailboxes, associated, respectively, to one or two, distinct,
shared memory areas: any other combination should be treated as invalid.

Add more strict checking of SCMI mailbox transport device node descriptors.

Fixes: 6edcc80f3d90 ("firmware: arm_scmi: Make scmi core independent of the transport type")
Cc: <stable@vger.kernel.org> # 4.19
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230307162324.891866-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
[Cristian: backported to v5.4]
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/arm_scmi/driver.c