All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Archit Taneja <architt@codeaurora.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Ben Skeggs <bskeggs@redhat.com>
Cc: Linux kernel <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: BUG caused by "Use new drm_fb_helper functions" series
Date: Tue, 2 Feb 2016 10:38:43 -0800	[thread overview]
Message-ID: <56B0F7B3.3020704@hurleysoftware.com> (raw)
In-Reply-To: <56B03CB4.8020503@codeaurora.org>

On 02/01/2016 09:20 PM, Archit Taneja wrote:
> Hi Peter,
> 
> On 02/02/2016 02:07 AM, Peter Hurley wrote:
>> Hi Archit,
>>
>> Just booting 4.4-rc5+, I got this splat [1]
>> At first glance, this appears to be a simple fix.
> 
> Thanks for sharing this.
> 
>>
>> 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()).
> 
> In the case when CONFIG_FB is enabled, drm_fb_helper_cfb_imageblit
> helper simply wraps around cfg_imageblit, so I don't see how we'd have
> any difference in behaviour.


Sorry; terrible attribution on my part.
This bug clearly has nothing to do with this series.

But a better look has me wondering how all these gpus are syncing
the framebuffer for direct access via cfb_imageblit and friends. I only see
nouveau and intel gma even trying.



>> 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.
> 
> We could revert the patch
> "drm/nouveau: Use new drm_fb_helper functions" and see if we still hit this
> issue.
> 
> Thanks,
> Archit
> 
>> 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: [<ffffffff8113a63f>] audit_receive+0x1f/0xa0
>> [   37.438507] irq event stamp: 1689
>> [   37.438511] hardirqs last  enabled at (1689): [<ffffffff810e9a96>] vprintk_emit+0x236/0x620
>> [   37.438513] hardirqs last disabled at (1688): [<ffffffff810e9934>] vprintk_emit+0xd4/0x620
>> [   37.438518] softirqs last  enabled at (1652): [<ffffffff81753898>] netlink_poll+0x138/0x1c0
>> [   37.438520] softirqs last disabled at (1650): [<ffffffff81753857>] 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]  [<ffffffff813fb6c5>] dump_stack+0x4e/0x79
>> [   37.438538]  [<ffffffff810a6fb9>] ___might_sleep+0x149/0x200
>> [   37.438540]  [<ffffffff810a70b9>] __might_sleep+0x49/0x80
>> [   37.438544]  [<ffffffff81202dfd>] kmem_cache_alloc_trace+0x20d/0x2e0
>> [   37.438600]  [<ffffffffa0272e9b>] ? nouveau_fence_new+0x3b/0x90 [nouveau]
>> [   37.438624]  [<ffffffffa0272e9b>] nouveau_fence_new+0x3b/0x90 [nouveau]
>> [   37.438649]  [<ffffffffa02707b2>] nouveau_channel_idle+0x42/0xb0 [nouveau]
>> [   37.438673]  [<ffffffffa026bb3f>] nouveau_fbcon_sync+0x7f/0xb0 [nouveau]
>> [   37.438677]  [<ffffffff8148998a>] cfb_imageblit+0x9a/0x4d0
>> [   37.438681]  [<ffffffff810d22ef>] ? trace_hardirqs_off_caller+0x1f/0xc0
>> [   37.438693]  [<ffffffffa013d30e>] drm_fb_helper_cfb_imageblit+0xe/0x10 [drm_kms_helper]
>> [   37.438717]  [<ffffffffa026bbc1>] nouveau_fbcon_imageblit+0x51/0xd0 [nouveau]
>> [   37.438719]  [<ffffffff8147c02c>] bit_putcs+0x2dc/0x530
>> [   37.438721]  [<ffffffff810d239d>] ? trace_hardirqs_off+0xd/0x10
>> [   37.438725]  [<ffffffff81476144>] ? get_color.isra.15+0x34/0x130
>> [   37.438727]  [<ffffffff81477278>] fbcon_putcs+0x128/0x160
>> [   37.438728]  [<ffffffff8147bd50>] ? bit_cursor+0x5e0/0x5e0
>> [   37.438730]  [<ffffffff8147756b>] fbcon_redraw.isra.25+0x16b/0x1d0
>> [   37.438731]  [<ffffffff8147894a>] fbcon_scroll+0x1ea/0xce0
>> [   37.438734]  [<ffffffff815112ca>] scrup+0x14a/0x160
>> [   37.438736]  [<ffffffff81511360>] lf+0x80/0x90
>> [   37.438737]  [<ffffffff81511617>] vt_console_print+0x2a7/0x3e0
>> [   37.438739]  [<ffffffff810e89c4>] call_console_drivers.constprop.24+0x144/0x1d0
>> [   37.438741]  [<ffffffff810e9783>] console_unlock+0x463/0x540
>> [   37.438742]  [<ffffffff810e9bba>] vprintk_emit+0x35a/0x620
>> [   37.438744]  [<ffffffff810e9fd9>] vprintk_default+0x29/0x40
>> [   37.438748]  [<ffffffff8119f71a>] printk+0x4d/0x4f
>> [   37.438750]  [<ffffffff81137ad2>] audit_printk_skb+0x62/0x70
>> [   37.438751]  [<ffffffff81137e84>] audit_log_end+0x1d4/0x2d0
>> [   37.438752]  [<ffffffff81137ce0>] ? audit_log_end+0x30/0x2d0
>> [   37.438754]  [<ffffffff81139059>] audit_log_config_change+0x89/0xa0
>> [   37.438756]  [<ffffffff8113a4ca>] audit_receive_msg+0xa5a/0xbb0
>> [   37.438759]  [<ffffffff818481bd>] ? mutex_lock_nested+0x2ed/0x450
>> [   37.438761]  [<ffffffff8113a63f>] ? audit_receive+0x1f/0xa0
>> [   37.438762]  [<ffffffff8113a63f>] ? audit_receive+0x1f/0xa0
>> [   37.438764]  [<ffffffff8113a672>] audit_receive+0x52/0xa0
>> [   37.438766]  [<ffffffff81755652>] netlink_unicast+0xf2/0x1c0
>> [   37.438767]  [<ffffffff81755b07>] netlink_sendmsg+0x3e7/0x620
>> [   37.438771]  [<ffffffff816ff4e8>] sock_sendmsg+0x38/0x50
>> [   37.438772]  [<ffffffff816ff946>] SYSC_sendto+0xf6/0x170
>> [   37.438775]  [<ffffffff8119db8d>] ? context_tracking_exit+0x1d/0x30
>> [   37.438778]  [<ffffffff8100367f>] ? enter_from_user_mode+0x1f/0x50
>> [   37.438780]  [<ffffffff8100377b>] ? syscall_trace_enter_phase1+0xcb/0x130
>> [   37.438781]  [<ffffffff81003017>] ? trace_hardirqs_on_thunk+0x17/0x19
>> [   37.438784]  [<ffffffff8170079e>] SyS_sendto+0xe/0x10
>> [   37.438786]  [<ffffffff8184be36>] entry_SYSCALL_64_fastpath+0x16/0x7a
>>
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Peter Hurley <peter@hurleysoftware.com>
To: Archit Taneja <architt@codeaurora.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Ben Skeggs <bskeggs@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: BUG caused by "Use new drm_fb_helper functions" series
Date: Tue, 2 Feb 2016 10:38:43 -0800	[thread overview]
Message-ID: <56B0F7B3.3020704@hurleysoftware.com> (raw)
In-Reply-To: <56B03CB4.8020503@codeaurora.org>

On 02/01/2016 09:20 PM, Archit Taneja wrote:
> Hi Peter,
> 
> On 02/02/2016 02:07 AM, Peter Hurley wrote:
>> Hi Archit,
>>
>> Just booting 4.4-rc5+, I got this splat [1]
>> At first glance, this appears to be a simple fix.
> 
> Thanks for sharing this.
> 
>>
>> 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()).
> 
> In the case when CONFIG_FB is enabled, drm_fb_helper_cfb_imageblit
> helper simply wraps around cfg_imageblit, so I don't see how we'd have
> any difference in behaviour.


Sorry; terrible attribution on my part.
This bug clearly has nothing to do with this series.

But a better look has me wondering how all these gpus are syncing
the framebuffer for direct access via cfb_imageblit and friends. I only see
nouveau and intel gma even trying.



>> 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.
> 
> We could revert the patch
> "drm/nouveau: Use new drm_fb_helper functions" and see if we still hit this
> issue.
> 
> Thanks,
> Archit
> 
>> 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: [<ffffffff8113a63f>] audit_receive+0x1f/0xa0
>> [   37.438507] irq event stamp: 1689
>> [   37.438511] hardirqs last  enabled at (1689): [<ffffffff810e9a96>] vprintk_emit+0x236/0x620
>> [   37.438513] hardirqs last disabled at (1688): [<ffffffff810e9934>] vprintk_emit+0xd4/0x620
>> [   37.438518] softirqs last  enabled at (1652): [<ffffffff81753898>] netlink_poll+0x138/0x1c0
>> [   37.438520] softirqs last disabled at (1650): [<ffffffff81753857>] 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]  [<ffffffff813fb6c5>] dump_stack+0x4e/0x79
>> [   37.438538]  [<ffffffff810a6fb9>] ___might_sleep+0x149/0x200
>> [   37.438540]  [<ffffffff810a70b9>] __might_sleep+0x49/0x80
>> [   37.438544]  [<ffffffff81202dfd>] kmem_cache_alloc_trace+0x20d/0x2e0
>> [   37.438600]  [<ffffffffa0272e9b>] ? nouveau_fence_new+0x3b/0x90 [nouveau]
>> [   37.438624]  [<ffffffffa0272e9b>] nouveau_fence_new+0x3b/0x90 [nouveau]
>> [   37.438649]  [<ffffffffa02707b2>] nouveau_channel_idle+0x42/0xb0 [nouveau]
>> [   37.438673]  [<ffffffffa026bb3f>] nouveau_fbcon_sync+0x7f/0xb0 [nouveau]
>> [   37.438677]  [<ffffffff8148998a>] cfb_imageblit+0x9a/0x4d0
>> [   37.438681]  [<ffffffff810d22ef>] ? trace_hardirqs_off_caller+0x1f/0xc0
>> [   37.438693]  [<ffffffffa013d30e>] drm_fb_helper_cfb_imageblit+0xe/0x10 [drm_kms_helper]
>> [   37.438717]  [<ffffffffa026bbc1>] nouveau_fbcon_imageblit+0x51/0xd0 [nouveau]
>> [   37.438719]  [<ffffffff8147c02c>] bit_putcs+0x2dc/0x530
>> [   37.438721]  [<ffffffff810d239d>] ? trace_hardirqs_off+0xd/0x10
>> [   37.438725]  [<ffffffff81476144>] ? get_color.isra.15+0x34/0x130
>> [   37.438727]  [<ffffffff81477278>] fbcon_putcs+0x128/0x160
>> [   37.438728]  [<ffffffff8147bd50>] ? bit_cursor+0x5e0/0x5e0
>> [   37.438730]  [<ffffffff8147756b>] fbcon_redraw.isra.25+0x16b/0x1d0
>> [   37.438731]  [<ffffffff8147894a>] fbcon_scroll+0x1ea/0xce0
>> [   37.438734]  [<ffffffff815112ca>] scrup+0x14a/0x160
>> [   37.438736]  [<ffffffff81511360>] lf+0x80/0x90
>> [   37.438737]  [<ffffffff81511617>] vt_console_print+0x2a7/0x3e0
>> [   37.438739]  [<ffffffff810e89c4>] call_console_drivers.constprop.24+0x144/0x1d0
>> [   37.438741]  [<ffffffff810e9783>] console_unlock+0x463/0x540
>> [   37.438742]  [<ffffffff810e9bba>] vprintk_emit+0x35a/0x620
>> [   37.438744]  [<ffffffff810e9fd9>] vprintk_default+0x29/0x40
>> [   37.438748]  [<ffffffff8119f71a>] printk+0x4d/0x4f
>> [   37.438750]  [<ffffffff81137ad2>] audit_printk_skb+0x62/0x70
>> [   37.438751]  [<ffffffff81137e84>] audit_log_end+0x1d4/0x2d0
>> [   37.438752]  [<ffffffff81137ce0>] ? audit_log_end+0x30/0x2d0
>> [   37.438754]  [<ffffffff81139059>] audit_log_config_change+0x89/0xa0
>> [   37.438756]  [<ffffffff8113a4ca>] audit_receive_msg+0xa5a/0xbb0
>> [   37.438759]  [<ffffffff818481bd>] ? mutex_lock_nested+0x2ed/0x450
>> [   37.438761]  [<ffffffff8113a63f>] ? audit_receive+0x1f/0xa0
>> [   37.438762]  [<ffffffff8113a63f>] ? audit_receive+0x1f/0xa0
>> [   37.438764]  [<ffffffff8113a672>] audit_receive+0x52/0xa0
>> [   37.438766]  [<ffffffff81755652>] netlink_unicast+0xf2/0x1c0
>> [   37.438767]  [<ffffffff81755b07>] netlink_sendmsg+0x3e7/0x620
>> [   37.438771]  [<ffffffff816ff4e8>] sock_sendmsg+0x38/0x50
>> [   37.438772]  [<ffffffff816ff946>] SYSC_sendto+0xf6/0x170
>> [   37.438775]  [<ffffffff8119db8d>] ? context_tracking_exit+0x1d/0x30
>> [   37.438778]  [<ffffffff8100367f>] ? enter_from_user_mode+0x1f/0x50
>> [   37.438780]  [<ffffffff8100377b>] ? syscall_trace_enter_phase1+0xcb/0x130
>> [   37.438781]  [<ffffffff81003017>] ? trace_hardirqs_on_thunk+0x17/0x19
>> [   37.438784]  [<ffffffff8170079e>] SyS_sendto+0xe/0x10
>> [   37.438786]  [<ffffffff8184be36>] entry_SYSCALL_64_fastpath+0x16/0x7a
>>
> 

  reply	other threads:[~2016-02-02 18:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 20:37 BUG caused by "Use new drm_fb_helper functions" series Peter Hurley
2016-02-01 20:37 ` Peter Hurley
2016-02-02  5:20 ` Archit Taneja
2016-02-02  5:20   ` Archit Taneja
2016-02-02 18:38   ` Peter Hurley [this message]
2016-02-02 18:38     ` Peter Hurley
2016-02-03  9:30     ` Michel Dänzer
2016-02-03  9:30       ` Michel Dänzer
2016-02-09  9:32       ` Daniel Vetter
2016-02-09  9:32         ` Daniel Vetter
2016-02-09 13:44         ` One Thousand Gnomes
2016-02-09 13:44           ` One Thousand Gnomes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B0F7B3.3020704@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=architt@codeaurora.org \
    --cc=bskeggs@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.