From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882AbcBAUhL (ORCPT ); Mon, 1 Feb 2016 15:37:11 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35385 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872AbcBAUhH (ORCPT ); Mon, 1 Feb 2016 15:37:07 -0500 From: Peter Hurley To: Archit Taneja , Daniel Vetter , Ben Skeggs Cc: David Airlie , "dri-devel@lists.freedesktop.org" , Linux kernel Subject: BUG caused by "Use new drm_fb_helper functions" series Message-ID: <56AFC1F1.5080507@hurleysoftware.com> Date: Mon, 1 Feb 2016 12:37:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Archit, Just booting 4.4-rc5+, I got this splat [1] At first glance, this appears to be a simple fix. However, I'm concerned that fbcon functions, which may be called with interrupts disabled, are now hooked up to fbdev functions which may assume interrupts are not disabled (as is the case with cfb_imageblit()). For example, in the splat below, it's a simple fix to make the splat go away with GFP_ATOMIC allocation. However, the following fence wait is _never_ going to trigger with interrupts disabled on UP. FWIW, I've been running almost exclusively debug kernel builds so I'm not sure why this hasn't triggered many times before, but it hasn't. Regards, Peter Hurley [1] BUG splat [ 37.438494] BUG: sleeping function called from invalid context at /home/peter/src/kernels/mainline/mm/slub.c:1287 [ 37.438495] in_atomic(): 1, irqs_disabled(): 1, pid: 2276, name: auditd [ 37.438497] 1 lock held by auditd/2276: [ 37.438507] #0: (audit_cmd_mutex){+.+.+.}, at: [] audit_receive+0x1f/0xa0 [ 37.438507] irq event stamp: 1689 [ 37.438511] hardirqs last enabled at (1689): [] vprintk_emit+0x236/0x620 [ 37.438513] hardirqs last disabled at (1688): [] vprintk_emit+0xd4/0x620 [ 37.438518] softirqs last enabled at (1652): [] netlink_poll+0x138/0x1c0 [ 37.438520] softirqs last disabled at (1650): [] netlink_poll+0xf7/0x1c0 [ 37.438522] CPU: 7 PID: 2276 Comm: auditd Not tainted 4.4.0-rc5+wip-xeon+debug #rc5+wip [ 37.438523] Hardware name: Dell Inc. Precision WorkStation T5400 /0RW203, BIOS A11 04/30/2012 [ 37.438526] ffffffff81ce5cc8 ffff8802a87c3590 ffffffff813fb6c5 ffff8802ac768000 [ 37.438528] ffff8802a87c35b8 ffffffff810a6fb9 ffffffff81ce5cc8 0000000000000507 [ 37.438530] 0000000000000000 ffff8802a87c35e0 ffffffff810a70b9 00000000024080c0 [ 37.438531] Call Trace: [ 37.438535] [] dump_stack+0x4e/0x79 [ 37.438538] [] ___might_sleep+0x149/0x200 [ 37.438540] [] __might_sleep+0x49/0x80 [ 37.438544] [] kmem_cache_alloc_trace+0x20d/0x2e0 [ 37.438600] [] ? nouveau_fence_new+0x3b/0x90 [nouveau] [ 37.438624] [] nouveau_fence_new+0x3b/0x90 [nouveau] [ 37.438649] [] nouveau_channel_idle+0x42/0xb0 [nouveau] [ 37.438673] [] nouveau_fbcon_sync+0x7f/0xb0 [nouveau] [ 37.438677] [] cfb_imageblit+0x9a/0x4d0 [ 37.438681] [] ? trace_hardirqs_off_caller+0x1f/0xc0 [ 37.438693] [] drm_fb_helper_cfb_imageblit+0xe/0x10 [drm_kms_helper] [ 37.438717] [] nouveau_fbcon_imageblit+0x51/0xd0 [nouveau] [ 37.438719] [] bit_putcs+0x2dc/0x530 [ 37.438721] [] ? trace_hardirqs_off+0xd/0x10 [ 37.438725] [] ? get_color.isra.15+0x34/0x130 [ 37.438727] [] fbcon_putcs+0x128/0x160 [ 37.438728] [] ? bit_cursor+0x5e0/0x5e0 [ 37.438730] [] fbcon_redraw.isra.25+0x16b/0x1d0 [ 37.438731] [] fbcon_scroll+0x1ea/0xce0 [ 37.438734] [] scrup+0x14a/0x160 [ 37.438736] [] lf+0x80/0x90 [ 37.438737] [] vt_console_print+0x2a7/0x3e0 [ 37.438739] [] call_console_drivers.constprop.24+0x144/0x1d0 [ 37.438741] [] console_unlock+0x463/0x540 [ 37.438742] [] vprintk_emit+0x35a/0x620 [ 37.438744] [] vprintk_default+0x29/0x40 [ 37.438748] [] printk+0x4d/0x4f [ 37.438750] [] audit_printk_skb+0x62/0x70 [ 37.438751] [] audit_log_end+0x1d4/0x2d0 [ 37.438752] [] ? audit_log_end+0x30/0x2d0 [ 37.438754] [] audit_log_config_change+0x89/0xa0 [ 37.438756] [] audit_receive_msg+0xa5a/0xbb0 [ 37.438759] [] ? mutex_lock_nested+0x2ed/0x450 [ 37.438761] [] ? audit_receive+0x1f/0xa0 [ 37.438762] [] ? audit_receive+0x1f/0xa0 [ 37.438764] [] audit_receive+0x52/0xa0 [ 37.438766] [] netlink_unicast+0xf2/0x1c0 [ 37.438767] [] netlink_sendmsg+0x3e7/0x620 [ 37.438771] [] sock_sendmsg+0x38/0x50 [ 37.438772] [] SYSC_sendto+0xf6/0x170 [ 37.438775] [] ? context_tracking_exit+0x1d/0x30 [ 37.438778] [] ? enter_from_user_mode+0x1f/0x50 [ 37.438780] [] ? syscall_trace_enter_phase1+0xcb/0x130 [ 37.438781] [] ? trace_hardirqs_on_thunk+0x17/0x19 [ 37.438784] [] SyS_sendto+0xe/0x10 [ 37.438786] [] entry_SYSCALL_64_fastpath+0x16/0x7a