Skip to content

drm/xe: skip devcoredump registration on kernels without dev_coredump_put()#325

Open
knayana-gse wants to merge 1 commit into
intel-gpu:oot-backport/mainfrom
knayana-gse:oot-bp-main-0406
Open

drm/xe: skip devcoredump registration on kernels without dev_coredump_put()#325
knayana-gse wants to merge 1 commit into
intel-gpu:oot-backport/mainfrom
knayana-gse:oot-bp-main-0406

Conversation

@knayana-gse

Copy link
Copy Markdown

dev_coredump_put() was added in v6.10 (commit a28380f119a9). On older
kernels, xe_driver_devcoredump_fini() calling it unconditionally causes
mutex corruption (DEBUG_LOCKS_WARN_ON) during module unload/reload.

A header-only backport is not possible: dev_coredump_put() relies on
devcd_class, a file-scope static in drivers/base/devcoredump.c that is
never exported.

On kernels where BPM_DEVCOREDUMP_PUT_NOT_PRESENT is defined, the deferred
snapshot worker frees captured state immediately instead of registering a
persistent coredump entry, and the fini callback skips the
dev_coredump_put() call.

Signed-off-by: Kanaka Raju Nayana kanaka.raju.nayana@intel.com

…_put()

dev_coredump_put() was added in v6.10 (commit a28380f119a9). On older
kernels, xe_driver_devcoredump_fini() calling it unconditionally causes
mutex corruption (DEBUG_LOCKS_WARN_ON) during module unload/reload.

A header-only backport is not possible: dev_coredump_put() relies on
devcd_class, a file-scope static in drivers/base/devcoredump.c that is
never exported.

On kernels where BPM_DEVCOREDUMP_PUT_NOT_PRESENT is defined, the deferred
snapshot worker frees captured state immediately instead of registering a
persistent coredump entry, and the fini callback skips the
dev_coredump_put() call.

Signed-off-by: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com>
devcd_class, a file-scope static in drivers/base/devcoredump.c that is
never exported.

On kernels below 6.10, where BPM_DEVCOREDUMP_PUT_NOT_PRESENT is defined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have it as a limitation in documentation. Please add a note on the readme

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the implication of the calling freeing snapshot. are we going to miss coredump during issue

{
struct drm_device *drm = arg;

+#ifndef BPM_DEVCOREDUMP_PUT_NOT_PRESENT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead cant we simply pass NULL during init if macro is defined and that way , this function wont be called "xe_driver_devcoredump_fini"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants