Bug 120591 - BUG() in dmesg after loading nouveau module
Summary: BUG() in dmesg after loading nouveau module
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-18 16:17 UTC by Dmitrii Tcvetkov
Modified: 2016-06-24 22:30 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.7-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (943.74 KB, text/x-log)
2016-06-18 16:17 UTC, Dmitrii Tcvetkov
Details
kernel config (93.38 KB, text/plain)
2016-06-18 16:18 UTC, Dmitrii Tcvetkov
Details
fix (457 bytes, patch)
2016-06-19 09:00 UTC, Dmitrii Tcvetkov
Details | Diff
dmesg with patched kernel (59.26 KB, text/plain)
2016-06-19 09:01 UTC, Dmitrii Tcvetkov
Details

Description Dmitrii Tcvetkov 2016-06-18 16:17:46 UTC
Created attachment 220561 [details]
dmesg

OS: Arch Linux
Video adapter: GeForce GTX 780 Ti
xf86-nouveau: 1.0.12

I blacklisted nouveau module for full OS initialisation before reproducing, then issued:
# modprobe nouveau debug=trace

After that screen becomes black and in dmesg appears:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000210

Bug is not reproducible with 4.7-rc2 or earlier mainline.
Comment 1 Dmitrii Tcvetkov 2016-06-18 16:18:35 UTC
Created attachment 220571 [details]
kernel config
Comment 2 Ilia Mirkin 2016-06-18 16:36:29 UTC
Looks like

commit f045f459d925138fe7d6193a8c86406bda7e49da
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Thu Jun 2 12:23:31 2016 +1000

    drm/nouveau/fbcon: fix out-of-bounds memory accesses

does not properly deal with disabled fbdev emulation.

Can you add a

if (fbcon->helper.fbdev)

before that added line in nouveau_fbcon_init? I assume that will resolve your issue.
Comment 3 Dmitrii Tcvetkov 2016-06-19 09:00:20 UTC
Created attachment 220611 [details]
fix

Suggested by Ilia Mirkin
Comment 4 Dmitrii Tcvetkov 2016-06-19 09:01:11 UTC
Thanks, that change helped, nouveau loaded successfully, Xorg started normally.
Comment 5 Dmitrii Tcvetkov 2016-06-19 09:01:47 UTC
Created attachment 220621 [details]
dmesg with patched kernel
Comment 6 Ilia Mirkin 2016-06-20 00:27:30 UTC
Dmitrii, you should mail that patch (as a proper commit) to bskeggs@redhat.com and/or nouveau@lists.freedesktop.org . If you're not sure how to do that, I can take care of that for you.
Comment 7 Dmitrii Tcvetkov 2016-06-20 11:32:20 UTC
Thank you for advice, I've sent the patch, mail awaits moderation.
Comment 8 Dmitrii Tcvetkov 2016-06-24 22:30:22 UTC
commit 52dfcc5ccfbb6697ac3cac7f7ff1e712760e1216
Author: Dmitrii Tcvetkov <demfloro@demfloro.ru>
Date:   Mon Jun 20 13:52:14 2016 +0300

    drm/nouveau: fix for disabled fbdev emulation

Note You need to log in before you can comment on or make changes to this bug.