mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
gpu: nova-core: fix packed registry table size
`PACKED_REGISTRY_TABLE::size` describes the entire table, including its
fixed-size header. `SetRegistry` currently initializes it with only the
variable payload length, omitting the 8 bytes header.
Fix this by using `CommandToGsp::size` to obtain the actual command
size, including its header.
Fixes: 19b0a6e7c2 ("gpu: nova-core: gsp: Add SetRegistry command")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/20260722075253.B6DDB1F00A3D@smtp.kernel.org
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260723-nova-registry-size-fix-v1-1-8f471ba00ab4@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This commit is contained in:
parent
6dcbb4b132
commit
93b9511a3b
|
|
@ -127,10 +127,7 @@ impl CommandToGsp for SetRegistry {
|
|||
type InitError = Infallible;
|
||||
|
||||
fn init(&self) -> impl Init<Self::Command, Self::InitError> {
|
||||
Self::Command::init(
|
||||
self.entries.len() as u32,
|
||||
self.variable_payload_len() as u32,
|
||||
)
|
||||
Self::Command::init(self.entries.len() as u32, self.size() as u32)
|
||||
}
|
||||
|
||||
fn variable_payload_len(&self) -> usize {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user