Skip to content

Commit 47206d7

Browse files
briankocogregkh
authored andcommitted
drm/amdkfd: Fix improper NULL termination of queue restore SMI event string
[ Upstream commit 969faea ] Pass character "0" rather than NULL terminator to properly format queue restoration SMI events. Currently, the NULL terminator precedes the newline character that is intended to delineate separate events in the SMI event buffer, which can break userspace parsers. Signed-off-by: Brian Kocoloski <brian.kocoloski@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 6e7143e) Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1c06d85 commit 47206d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ void kfd_smi_event_queue_restore(struct kfd_node *node, pid_t pid)
312312
{
313313
kfd_smi_event_add(pid, node, KFD_SMI_EVENT_QUEUE_RESTORE,
314314
KFD_EVENT_FMT_QUEUE_RESTORE(ktime_get_boottime_ns(), pid,
315-
node->id, 0));
315+
node->id, '0'));
316316
}
317317

318318
void kfd_smi_event_queue_restore_rescheduled(struct mm_struct *mm)

0 commit comments

Comments
 (0)