From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932726AbaEENCL (ORCPT ); Mon, 5 May 2014 09:02:11 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41802 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932216AbaEENCK (ORCPT ); Mon, 5 May 2014 09:02:10 -0400 Date: Mon, 05 May 2014 15:02:09 +0200 Message-ID: From: Takashi Iwai To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Subject: Atomicity in KMS panic notifier User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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