All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] drm/amdgpu: Fix NULL-deref in amdgpu_device_fini_sw()
@ 2022-09-30 21:41 ` Zhang Boyang
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang Boyang @ 2022-09-30 21:41 UTC (permalink / raw)
  To: Andrey Grodzovsky, Christian König, linux-kernel, amd-gfx
  Cc: Steven J Abner, David C . Rankin

Hi,

There are several reports of "Fatal error during GPU init" will cause
NULL-deref in amdgpu_device_fini_sw(). Although the NULL-deref is result
instead of reason, this NULL-deref will confuse user.

https://lore.kernel.org/lkml/a8bce489-8ccc-aa95-3de6-f854e03ad557@suddenlinkmail.com/
https://lore.kernel.org/lkml/AT9WHR.3Z1T3VI9A2AQ3@att.net/

This is probably because "adev" is not fully initialized when
amdgpu_device_init() failed. Thus subsequent amdgpu_device_fini_sw()
will try to release "adev->reset_domain" and cause NULL-deref.

This patch fixes this problem by guarding the code with an "if".
However, I'm new to this module and I didn't fully understand the code,
so please review my code carefully.

Best Regards,
Zhang Boyang



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-03 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-30 21:41 [RFC PATCH 0/1] drm/amdgpu: Fix NULL-deref in amdgpu_device_fini_sw() Zhang Boyang
2022-09-30 21:41 ` Zhang Boyang
2022-09-30 21:41 ` [RFC PATCH 1/1] drm/amdgpu: Fix null-ptr-deref " Zhang Boyang
2022-09-30 21:41   ` Zhang Boyang
2022-09-30 22:38   ` Steven J Abner
2022-09-30 22:38     ` Steven J Abner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.