Atomicity in KMS panic notifier

Takashi Iwai tiwai at suse.de
Mon May 5 06:02:09 PDT 2014


Hi,

while debugging a few reported bugs, I noticed that
drm_fb_helper_force_kernel_mode() that is called in the KMS panic
notifier isn't really atomic-safe.  It invokes crtc's set_config(),
and all implementations seem to involve with page allocations (kmalloc
with GFP_KERNEL, via some ttm ops, etc).  I've actually seen the Oops
with cirrus KMS during panic due to this.

Does anyone have an idea to fix this?  I thought of re-using
drm_fb_helper_debug_enter(), but this won't work with many drivers
that don't have crtc->mode_set_base_atomic(), either (yeah, this is
another bug).


thanks,

Takashi


More information about the dri-devel mailing list