If drm_fb_helper_alloc_fbi() fails then we were directly returning without freeing sysram. Also if drm_fb_helper_alloc_fbi() succeeds but mgag200_framebuffer_init() fails then we were not releasing sysram and we were not releasing fbi helper also.
Signed-off-by: Sudip Mukherjee sudip@vectorindia.org --- drivers/gpu/drm/mgag200/mgag200_fb.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..5fe476a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -189,14 +189,16 @@ static int mgag200fb_create(struct drm_fb_helper *helper, return -ENOMEM;
info = drm_fb_helper_alloc_fbi(helper); - if (IS_ERR(info)) - return PTR_ERR(info); + if (IS_ERR(info)) { + ret = PTR_ERR(info); + goto err_alloc_fbi; + }
info->par = mfbdev;
ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); if (ret) - return ret; + goto err_framebuffer_init;
mfbdev->sysram = sysram; mfbdev->size = size; @@ -226,6 +228,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper, DRM_DEBUG_KMS("allocated %dx%d\n", fb->width, fb->height); return 0; + +err_framebuffer_init: + drm_fb_helper_release_fbi(helper); + +err_alloc_fbi: + vfree(sysram); + return ret; }
static int mga_fbdev_destroy(struct drm_device *dev,
* Sudip Mukherjee sudipm.mukherjee@gmail.com wrote:
If drm_fb_helper_alloc_fbi() fails then we were directly returning without freeing sysram. Also if drm_fb_helper_alloc_fbi() succeeds but mgag200_framebuffer_init() fails then we were not releasing sysram and we were not releasing fbi helper also.
Signed-off-by: Sudip Mukherjee sudip@vectorindia.org
drivers/gpu/drm/mgag200/mgag200_fb.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..5fe476a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -189,14 +189,16 @@ static int mgag200fb_create(struct drm_fb_helper *helper, return -ENOMEM;
info = drm_fb_helper_alloc_fbi(helper);
- if (IS_ERR(info))
return PTR_ERR(info);
if (IS_ERR(info)) {
ret = PTR_ERR(info);
goto err_alloc_fbi;
}
info->par = mfbdev;
ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); if (ret)
return ret;
goto err_framebuffer_init;
mfbdev->sysram = sysram; mfbdev->size = size;
@@ -226,6 +228,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper, DRM_DEBUG_KMS("allocated %dx%d\n", fb->width, fb->height); return 0;
+err_framebuffer_init:
- drm_fb_helper_release_fbi(helper);
+err_alloc_fbi:
- vfree(sysram);
- return ret;
}
static int mga_fbdev_destroy(struct drm_device *dev,
There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if CONFIG_DRM_MGAG200=y (built into the kernel).
[ 10.191561] bus: 'i2c': add device i2c-0 [ 10.227367] mgadrmfb: enable CONFIG_FB_LITTLE_ENDIAN to support this framebuffer [ 10.235781] [drm:mgag200_modeset_init] *ERROR* mga_fbdev_init failed [ 10.242992] mgag200 0000:0b:00.0: Fatal error during modeset init: -22 [ 10.250456] kfree_debugcheck: out of range ptr 6b6b6b6b6b6b6b6bh. [ 10.257378] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 10.264730] Modules linked in: [ 10.268319] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc1-01643-g6013d75-dirty #15 [ 10.277498] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 10.289111] task: ffff88017fb6c040 ti: ffff88017fb70000 task.ti: ffff88017fb70000 [ 10.297611] RIP: 0010:[<ffffffffa493d1a7>] [<ffffffffa493d1a7>] kfree_debugcheck+0x20/0x25 [ 10.307170] RSP: 0000:ffff88017fb73b28 EFLAGS: 00010086 [ 10.313213] RAX: 0000000000000035 RBX: 6b6b6b6b6b6b6b6b RCX: 0000000000000000 [ 10.321297] RDX: ffffffffa489ac8f RSI: ffffffffa489b27b RDI: ffffffffa489b11e [ 10.329381] RBP: ffff88017fb73b30 R08: 0000000000000001 R09: 0000000000000000 [ 10.337466] R10: ffffffffa537dec0 R11: 0000000000000000 R12: 0000000000000001 [ 10.345549] R13: ffffffffa4c2c22a R14: 0000000000000202 R15: ffff8807ee3f1018 [ 10.353632] FS: 0000000000000000(0000) GS:ffff88081b200000(0000) knlGS:0000000000000000 [ 10.362812] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 10.369330] CR2: 0000000000000000 CR3: 00000000258c0000 CR4: 00000000001406f0 [ 10.377415] Stack: [ 10.379761] 6b6b6b6b6b6b6b6b ffff88017fb73b70 ffffffffa493e421 ffff8807ee784ea0 [ 10.388499] ffff8807ee784e18 0000000000000001 ffff8807ee361060 00000000ffffffea [ 10.397238] ffff8807ee3f1018 ffff88017fb73b98 ffffffffa4c2c22a ffff8807ee784e18 [ 10.405968] Call Trace: [ 10.408804] [<ffffffffa493e421>] kfree+0x5a/0x195 [ 10.414256] [<ffffffffa4c2c22a>] drm_fb_helper_crtc_free+0x28/0x75 [ 10.421368] [<ffffffffa4c2cbbd>] drm_fb_helper_fini+0x6b/0x6e [ 10.427996] [<ffffffffa4ce522d>] mgag200_fbdev_fini+0x8a/0xb9 [ 10.434621] [<ffffffffa4ce0a17>] mgag200_driver_unload+0x23/0x43 [ 10.441539] [<ffffffffa4ce0ee1>] mgag200_driver_load+0x4aa/0x4bc [ 10.448458] [<ffffffffa4c3537c>] drm_dev_register+0x6a/0xab [ 10.454889] [<ffffffffa4c36e42>] drm_get_pci_dev+0xe8/0x1ab [ 10.461322] [<ffffffffa4ce4b73>] mga_pci_probe+0xa1/0xaa [ 10.467465] [<ffffffffa4b785ba>] pci_device_probe+0x7e/0xe8 ...
Thanks,
Ingo
On Sun, Sep 13, 2015 at 11:36:07AM +0200, Ingo Molnar wrote:
- Sudip Mukherjee sudipm.mukherjee@gmail.com wrote:
<snip>
There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if CONFIG_DRM_MGAG200=y (built into the kernel).
I am not able to reproduce it with and without my patch applied. I have attached my config file. Compiled and booted on my test system also tried on qemu. Can you please give your .config file.
regards sudip
* Sudip Mukherjee sudipm.mukherjee@gmail.com wrote:
On Sun, Sep 13, 2015 at 11:36:07AM +0200, Ingo Molnar wrote:
- Sudip Mukherjee sudipm.mukherjee@gmail.com wrote:
<snip> > > There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if > CONFIG_DRM_MGAG200=y (built into the kernel).
I am not able to reproduce it with and without my patch applied. I have attached my config file. Compiled and booted on my test system also tried on qemu. Can you please give your .config file.
Sure - config and full crash.log attached.
NOTE: I booted this on native hardware that _does_ have MGAG200 hardware:
model name : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
BIOS Information Vendor: Intel Corp. Version: SE5C600
0b:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200e [Pilot] ServerEngines (SEP1) (rev 05)
So that's likely why you didn't see the crash under Qemu.
Thanks,
Ingo
If drm_fb_helper_alloc_fbi() fails then we were directly returning without freeing sysram. Also if drm_fb_helper_alloc_fbi() succeeds but mgag200_framebuffer_init() fails then we were not releasing sysram and we were not releasing fbi helper also.
Signed-off-by: Sudip Mukherjee sudip@vectorindia.org
drivers/gpu/drm/mgag200/mgag200_fb.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..5fe476a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -189,14 +189,16 @@ static int mgag200fb_create(struct drm_fb_helper *helper, return -ENOMEM;
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info))
return PTR_ERR(info);
if (IS_ERR(info)) {
ret = PTR_ERR(info);
goto err_alloc_fbi;
} info->par = mfbdev; ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); if (ret)
return ret;
goto err_framebuffer_init; mfbdev->sysram = sysram; mfbdev->size = size;
@@ -226,6 +228,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper, DRM_DEBUG_KMS("allocated %dx%d\n", fb->width, fb->height); return 0;
+err_framebuffer_init:
drm_fb_helper_release_fbi(helper);
+err_alloc_fbi:
vfree(sysram);
return ret;
}
static int mga_fbdev_destroy(struct drm_device *dev,
There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if CONFIG_DRM_MGAG200=y (built into the kernel).
Archit, I'm guessing this is some fallout from the fbdev changes.
There is no reason we should need CONFIG_FB_LITTLE_ENDIAN I don't think.
Dave.
[ 10.191561] bus: 'i2c': add device i2c-0 [ 10.227367] mgadrmfb: enable CONFIG_FB_LITTLE_ENDIAN to support this framebuffer [ 10.235781] [drm:mgag200_modeset_init] *ERROR* mga_fbdev_init failed [ 10.242992] mgag200 0000:0b:00.0: Fatal error during modeset init: -22 [ 10.250456] kfree_debugcheck: out of range ptr 6b6b6b6b6b6b6b6bh. [ 10.257378] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 10.264730] Modules linked in: [ 10.268319] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc1-01643-g6013d75-dirty #15 [ 10.277498] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 10.289111] task: ffff88017fb6c040 ti: ffff88017fb70000 task.ti: ffff88017fb70000 [ 10.297611] RIP: 0010:[<ffffffffa493d1a7>] [<ffffffffa493d1a7>] kfree_debugcheck+0x20/0x25 [ 10.307170] RSP: 0000:ffff88017fb73b28 EFLAGS: 00010086 [ 10.313213] RAX: 0000000000000035 RBX: 6b6b6b6b6b6b6b6b RCX: 0000000000000000 [ 10.321297] RDX: ffffffffa489ac8f RSI: ffffffffa489b27b RDI: ffffffffa489b11e [ 10.329381] RBP: ffff88017fb73b30 R08: 0000000000000001 R09: 0000000000000000 [ 10.337466] R10: ffffffffa537dec0 R11: 0000000000000000 R12: 0000000000000001 [ 10.345549] R13: ffffffffa4c2c22a R14: 0000000000000202 R15: ffff8807ee3f1018 [ 10.353632] FS: 0000000000000000(0000) GS:ffff88081b200000(0000) knlGS:0000000000000000 [ 10.362812] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 10.369330] CR2: 0000000000000000 CR3: 00000000258c0000 CR4: 00000000001406f0 [ 10.377415] Stack: [ 10.379761] 6b6b6b6b6b6b6b6b ffff88017fb73b70 ffffffffa493e421 ffff8807ee784ea0 [ 10.388499] ffff8807ee784e18 0000000000000001 ffff8807ee361060 00000000ffffffea [ 10.397238] ffff8807ee3f1018 ffff88017fb73b98 ffffffffa4c2c22a ffff8807ee784e18 [ 10.405968] Call Trace: [ 10.408804] [<ffffffffa493e421>] kfree+0x5a/0x195 [ 10.414256] [<ffffffffa4c2c22a>] drm_fb_helper_crtc_free+0x28/0x75 [ 10.421368] [<ffffffffa4c2cbbd>] drm_fb_helper_fini+0x6b/0x6e [ 10.427996] [<ffffffffa4ce522d>] mgag200_fbdev_fini+0x8a/0xb9 [ 10.434621] [<ffffffffa4ce0a17>] mgag200_driver_unload+0x23/0x43 [ 10.441539] [<ffffffffa4ce0ee1>] mgag200_driver_load+0x4aa/0x4bc [ 10.448458] [<ffffffffa4c3537c>] drm_dev_register+0x6a/0xab [ 10.454889] [<ffffffffa4c36e42>] drm_get_pci_dev+0xe8/0x1ab [ 10.461322] [<ffffffffa4ce4b73>] mga_pci_probe+0xa1/0xaa [ 10.467465] [<ffffffffa4b785ba>] pci_device_probe+0x7e/0xe8 ...
Thanks,
Ingo
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
(this time with correct email address).
On 14 September 2015 at 20:04, Dave Airlie airlied@gmail.com wrote:
If drm_fb_helper_alloc_fbi() fails then we were directly returning without freeing sysram. Also if drm_fb_helper_alloc_fbi() succeeds but mgag200_framebuffer_init() fails then we were not releasing sysram and we were not releasing fbi helper also.
Signed-off-by: Sudip Mukherjee sudip@vectorindia.org
drivers/gpu/drm/mgag200/mgag200_fb.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..5fe476a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -189,14 +189,16 @@ static int mgag200fb_create(struct drm_fb_helper *helper, return -ENOMEM;
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info))
return PTR_ERR(info);
if (IS_ERR(info)) {
ret = PTR_ERR(info);
goto err_alloc_fbi;
} info->par = mfbdev; ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); if (ret)
return ret;
goto err_framebuffer_init; mfbdev->sysram = sysram; mfbdev->size = size;
@@ -226,6 +228,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper, DRM_DEBUG_KMS("allocated %dx%d\n", fb->width, fb->height); return 0;
+err_framebuffer_init:
drm_fb_helper_release_fbi(helper);
+err_alloc_fbi:
vfree(sysram);
return ret;
}
static int mga_fbdev_destroy(struct drm_device *dev,
There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if CONFIG_DRM_MGAG200=y (built into the kernel).
Archit, I'm guessing this is some fallout from the fbdev changes.
There is no reason we should need CONFIG_FB_LITTLE_ENDIAN I don't think.
Dave.
[ 10.191561] bus: 'i2c': add device i2c-0 [ 10.227367] mgadrmfb: enable CONFIG_FB_LITTLE_ENDIAN to support this framebuffer [ 10.235781] [drm:mgag200_modeset_init] *ERROR* mga_fbdev_init failed [ 10.242992] mgag200 0000:0b:00.0: Fatal error during modeset init: -22 [ 10.250456] kfree_debugcheck: out of range ptr 6b6b6b6b6b6b6b6bh. [ 10.257378] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 10.264730] Modules linked in: [ 10.268319] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc1-01643-g6013d75-dirty #15 [ 10.277498] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 10.289111] task: ffff88017fb6c040 ti: ffff88017fb70000 task.ti: ffff88017fb70000 [ 10.297611] RIP: 0010:[<ffffffffa493d1a7>] [<ffffffffa493d1a7>] kfree_debugcheck+0x20/0x25 [ 10.307170] RSP: 0000:ffff88017fb73b28 EFLAGS: 00010086 [ 10.313213] RAX: 0000000000000035 RBX: 6b6b6b6b6b6b6b6b RCX: 0000000000000000 [ 10.321297] RDX: ffffffffa489ac8f RSI: ffffffffa489b27b RDI: ffffffffa489b11e [ 10.329381] RBP: ffff88017fb73b30 R08: 0000000000000001 R09: 0000000000000000 [ 10.337466] R10: ffffffffa537dec0 R11: 0000000000000000 R12: 0000000000000001 [ 10.345549] R13: ffffffffa4c2c22a R14: 0000000000000202 R15: ffff8807ee3f1018 [ 10.353632] FS: 0000000000000000(0000) GS:ffff88081b200000(0000) knlGS:0000000000000000 [ 10.362812] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 10.369330] CR2: 0000000000000000 CR3: 00000000258c0000 CR4: 00000000001406f0 [ 10.377415] Stack: [ 10.379761] 6b6b6b6b6b6b6b6b ffff88017fb73b70 ffffffffa493e421 ffff8807ee784ea0 [ 10.388499] ffff8807ee784e18 0000000000000001 ffff8807ee361060 00000000ffffffea [ 10.397238] ffff8807ee3f1018 ffff88017fb73b98 ffffffffa4c2c22a ffff8807ee784e18 [ 10.405968] Call Trace: [ 10.408804] [<ffffffffa493e421>] kfree+0x5a/0x195 [ 10.414256] [<ffffffffa4c2c22a>] drm_fb_helper_crtc_free+0x28/0x75 [ 10.421368] [<ffffffffa4c2cbbd>] drm_fb_helper_fini+0x6b/0x6e [ 10.427996] [<ffffffffa4ce522d>] mgag200_fbdev_fini+0x8a/0xb9 [ 10.434621] [<ffffffffa4ce0a17>] mgag200_driver_unload+0x23/0x43 [ 10.441539] [<ffffffffa4ce0ee1>] mgag200_driver_load+0x4aa/0x4bc [ 10.448458] [<ffffffffa4c3537c>] drm_dev_register+0x6a/0xab [ 10.454889] [<ffffffffa4c36e42>] drm_get_pci_dev+0xe8/0x1ab [ 10.461322] [<ffffffffa4ce4b73>] mga_pci_probe+0xa1/0xaa [ 10.467465] [<ffffffffa4b785ba>] pci_device_probe+0x7e/0xe8 ...
Thanks,
Ingo
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
On Mon, Sep 14, 2015 at 08:05:37PM +1000, Dave Airlie wrote:
(this time with correct email address).
On 14 September 2015 at 20:04, Dave Airlie airlied@gmail.com wrote:
There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if CONFIG_DRM_MGAG200=y (built into the kernel).
Archit, I'm guessing this is some fallout from the fbdev changes.
There is no reason we should need CONFIG_FB_LITTLE_ENDIAN I don't think.
I am assuming v4.2 has worked for Ingo. So in that case I don't see any change in fbdev/core/fbmem.c between 4.2 and 4.3-rc1. But in drm (I almost know nothing about drm) commit e829d7ef9f17 changes few codes related to the card revision. Can this help?
regards sudip
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index c99d3fe..5cdfa53 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1602,7 +1602,7 @@ static int mga_vga_mode_valid(struct drm_connector *connector, if (mga_vga_calculate_mode_bandwidth(mode, bpp) > (24400 * 1024)) return MODE_BANDWIDTH; - } else if (mdev->unique_rev_id == 0x02) { + } else if (mdev->unique_rev_id >= 0x02) { if (mode->hdisplay > 1920) return MODE_VIRTUAL_X; if (mode->vdisplay > 1200)
Hi,
On 9/14/2015 3:35 PM, Dave Airlie wrote:
(this time with correct email address).
On 14 September 2015 at 20:04, Dave Airlie airlied@gmail.com wrote:
If drm_fb_helper_alloc_fbi() fails then we were directly returning without freeing sysram. Also if drm_fb_helper_alloc_fbi() succeeds but mgag200_framebuffer_init() fails then we were not releasing sysram and we were not releasing fbi helper also.
Signed-off-by: Sudip Mukherjee sudip@vectorindia.org
drivers/gpu/drm/mgag200/mgag200_fb.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..5fe476a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -189,14 +189,16 @@ static int mgag200fb_create(struct drm_fb_helper *helper, return -ENOMEM;
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info))
return PTR_ERR(info);
if (IS_ERR(info)) {
ret = PTR_ERR(info);
goto err_alloc_fbi;
} info->par = mfbdev; ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); if (ret)
return ret;
goto err_framebuffer_init; mfbdev->sysram = sysram; mfbdev->size = size;
@@ -226,6 +228,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper, DRM_DEBUG_KMS("allocated %dx%d\n", fb->width, fb->height); return 0;
+err_framebuffer_init:
drm_fb_helper_release_fbi(helper);
+err_alloc_fbi:
vfree(sysram);
return ret;
}
static int mga_fbdev_destroy(struct drm_device *dev,
There's a new regression: v4.3-rc1 crashes on bootup on non-supported hardware, if CONFIG_DRM_MGAG200=y (built into the kernel).
Archit, I'm guessing this is some fallout from the fbdev changes.
There is no reason we should need CONFIG_FB_LITTLE_ENDIAN I don't think.
It looks like the mgag200 driver load fails and we crash in the error handling path. drm_fb_helper_fini ends up being called twice. The second call tries to free resources that were already free'd.
The erroneous path above should have existed even without the recent fbdev helper changes. I'm not sure what's causing the driver load to fail in the first place. It looks like it's failing at register_framebuffer. Is it possible that we never tried running this driver before with Big Endian set?
The patch below fixes the problem with the error path mentioned above. Could we try this?
From: Archit Taneja architt@codeaurora.org Date: Mon, 14 Sep 2015 20:11:43 +0530 Subject: [PATCH] drm/mgag200: Prevent calling drm_fb_helper_fini twice
mgag200_fbdev_init's error handling path calls drm_fb_helper_fini before bailing out. The error handling path of mgag200_driver_load also ends up calling drm_fb_helper_fini.
This results in drm_fb_helper_fini being called twice if the driver load drm op fails somewhere in between.
Make only mgag200_driver_unload call drm_fb_helper_fini, remove the call from mgag200_fbdev_init.
Signed-off-by: Archit Taneja architt@codeaurora.org --- drivers/gpu/drm/mgag200/mgag200_fb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..6259b0a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -280,20 +280,16 @@ int mgag200_fbdev_init(struct mga_device *mdev)
ret = drm_fb_helper_single_add_all_connectors(&mfbdev->helper); if (ret) - goto fini; + return ret;
/* disable all the possible outputs/crtcs before entering KMS mode */ drm_helper_disable_unused_functions(mdev->dev);
ret = drm_fb_helper_initial_config(&mfbdev->helper, bpp_sel); if (ret) - goto fini; + return ret;
return 0; - -fini: - drm_fb_helper_fini(&mfbdev->helper); - return ret; }
void mgag200_fbdev_fini(struct mga_device *mdev)
* Archit Taneja architt@codeaurora.org wrote:
From: Archit Taneja architt@codeaurora.org Date: Mon, 14 Sep 2015 20:11:43 +0530 Subject: [PATCH] drm/mgag200: Prevent calling drm_fb_helper_fini twice
mgag200_fbdev_init's error handling path calls drm_fb_helper_fini before bailing out. The error handling path of mgag200_driver_load also ends up calling drm_fb_helper_fini.
This results in drm_fb_helper_fini being called twice if the driver load drm op fails somewhere in between.
Make only mgag200_driver_unload call drm_fb_helper_fini, remove the call from mgag200_fbdev_init.
Signed-off-by: Archit Taneja architt@codeaurora.org
drivers/gpu/drm/mgag200/mgag200_fb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15e..6259b0a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -280,20 +280,16 @@ int mgag200_fbdev_init(struct mga_device *mdev)
ret = drm_fb_helper_single_add_all_connectors(&mfbdev->helper); if (ret)
goto fini;
return ret;
/* disable all the possible outputs/crtcs before entering KMS mode */ drm_helper_disable_unused_functions(mdev->dev);
ret = drm_fb_helper_initial_config(&mfbdev->helper, bpp_sel); if (ret)
goto fini;
return ret;
return 0;
-fini:
- drm_fb_helper_fini(&mfbdev->helper);
- return ret;
}
void mgag200_fbdev_fini(struct mga_device *mdev)
So this patch was whitespace damaged - I applied it by hand and made the commit below. This has solved the crash, thanks Archit!
And yes, you are right that my config probably crashed with older kernels too.
Ingo
=============>
From 60d733a3ec19dc72372e12207a0a86293cd40cf5 Mon Sep 17 00:00:00 2001
From: Archit Taneja architt@codeaurora.org Date: Mon, 14 Sep 2015 20:53:57 +0530 Subject: [PATCH] drm/mgag200: Fix calling drm_fb_helper_fini() twice
mgag200_fbdev_init()'s error handling path calls drm_fb_helper_fini() before bailing out. The error handling path of mgag200_driver_load() also ends up calling drm_fb_helper_fini().
This results in drm_fb_helper_fini() being called twice if the driver load drm op fails somewhere in between.
Make only mgag200_driver_unload() call drm_fb_helper_fini(), remove the call from mgag200_fbdev_init().
Reported-by: Ingo Molnar mingo@kernel.org Signed-off-by: Archit Taneja architt@codeaurora.org Cc: Archit Taneja archit@ti.com Cc: Daniel Vetter daniel.vetter@ffwll.ch Cc: Dave Airlie airlied@gmail.com Cc: David Airlie airlied@linux.ie Cc: Linus Torvalds torvalds@linux-foundation.org Cc: Peter Zijlstra peterz@infradead.org Cc: Sudip Mukherjee sudipm.mukherjee@gmail.com Cc: Thomas Gleixner tglx@linutronix.de Cc: dri-devel dri-devel@lists.freedesktop.org Link: http://lkml.kernel.org/r/55F6E68D.8070800@codeaurora.org Signed-off-by: Ingo Molnar mingo@kernel.org --- drivers/gpu/drm/mgag200/mgag200_fb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 87de15ea1f93..6259b0a5fc38 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -280,20 +280,16 @@ int mgag200_fbdev_init(struct mga_device *mdev)
ret = drm_fb_helper_single_add_all_connectors(&mfbdev->helper); if (ret) - goto fini; + return ret;
/* disable all the possible outputs/crtcs before entering KMS mode */ drm_helper_disable_unused_functions(mdev->dev);
ret = drm_fb_helper_initial_config(&mfbdev->helper, bpp_sel); if (ret) - goto fini; + return ret;
return 0; - -fini: - drm_fb_helper_fini(&mfbdev->helper); - return ret; }
void mgag200_fbdev_fini(struct mga_device *mdev)
* Ingo Molnar mingo@kernel.org wrote:
So this patch was whitespace damaged - I applied it by hand and made the commit below. This has solved the crash, thanks Archit!
Spoke too soon - the attached (allyesconfig-ish) config still crashes, first there are a handful of kobject debug warnings, then:
[ 115.274847] [drm:mgag200_mm_init] *ERROR* Failed setting up TTM memory accounting subsystem. [ 115.274853] BUG: unable to handle kernel NULL pointer dereference at (null) [ 115.274856] IP: [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc [ 115.274858] PGD 0 [ 115.274860] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN [ 115.274861] Modules linked in: [ 115.274862] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59 [ 115.274863] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 115.274865] Workqueue: events work_for_cpu_fn [ 115.274865] task: ffff88017d2a8000 ti: ffff88017d2b0000 task.ti: ffff88017d2b0000 [ 115.274868] RIP: 0010:[<ffffffff81b88285>] [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc [ 115.274868] RSP: 0000:ffff88017d2b7bd8 EFLAGS: 00010246 [ 115.274869] RAX: 0000000000000000 RBX: ffff8800ba0a4520 RCX: ffffffff81186ff1 [ 115.274870] RDX: ffff88017d2b7a90 RSI: ffffffff83d73579 RDI: ffff8800ba0a4520 [ 115.274870] RBP: ffff88017d2b7bf0 R08: 0000000000000001 R09: 0000000000000000 [ 115.274871] R10: 0000000000075000 R11: ffffffff85147a82 R12: ffff8800ba0a4520 [ 115.274872] R13: ffff8800ba0a4da8 R14: 00000000fffffffe R15: ffff8800ba0a3400 [ 115.274873] FS: 0000000000000000(0000) GS:ffff880420e00000(0000) knlGS:0000000000000000 [ 115.274874] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 115.274875] CR2: 0000000000000000 CR3: 0000000005e2d000 CR4: 00000000001406f0 [ 115.274876] Stack: [ 115.274877] ffff8800ba0a3400 ffff8800ba0a4520 00000000fffffffe ffff88017d2b7c10 [ 115.274879] ffffffff81cb6a3e ffff8800ba0a4520 ffff8800ba0a3400 ffff88017d2b7c78 [ 115.274881] ffffffff81cb6efe 0000072001000000 000000000000aa55 0000075b00000000 [ 115.274881] Call Trace: [ 115.274883] [<ffffffff81cb6a3e>] mgag200_driver_unload+0x30/0x48 [ 115.274884] [<ffffffff81cb6efe>] mgag200_driver_load+0x4a8/0x4ba [ 115.274886] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0 [ 115.274887] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2 [ 115.274889] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad [ 115.274890] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82 [ 115.274891] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b [ 115.274893] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef [ 115.274895] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef [ 115.274897] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
Full log is below, config attached as well.
Thanks,
Ingo
========================> [ 115.243547] mgag200 0000:0b:00.0: no default pinctrl state [ 115.243732] devices_kset: Moving 0000:0b:00.0 to end of list [ 115.247078] device: 'controlD64': device_add [ 115.247494] PM: Adding info for No Bus:controlD64 [ 115.247979] device: 'card0': device_add [ 115.248315] PM: Adding info for No Bus:card0 [ 115.274511] ------------[ cut here ]------------ [ 115.274518] WARNING: CPU: 0 PID: 4 at lib/kobject.c:582 kobject_get+0x33/0x6a() [ 115.274519] kobject: 'ttm' (ffffffff86c28700): is not initialized, yet kobject_get() is being called. [ 115.274521] Modules linked in: [ 115.274524] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59 [ 115.274525] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 115.274529] Workqueue: events work_for_cpu_fn [ 115.274532] 0000000000000000 ffff88017d2b79a8 ffffffff8188f38b ffff88017d2b79f0 [ 115.274534] ffff88017d2b79e0 ffffffff81144593 ffffffff8189129f ffffffff86c28700 [ 115.274536] 0000000000000000 ffffffff86c28700 00000000007f4000 ffff88017d2b7a40 [ 115.274537] Call Trace: [ 115.274540] [<ffffffff8188f38b>] dump_stack+0x4b/0x64 [ 115.274543] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8 [ 115.274545] [<ffffffff8189129f>] ? kobject_get+0x33/0x6a [ 115.274547] [<ffffffff811445f8>] warn_slowpath_fmt+0x4c/0x4e [ 115.274551] [<ffffffff811892de>] ? lock_is_held+0x55/0x66 [ 115.274553] [<ffffffff8189129f>] kobject_get+0x33/0x6a [ 115.274554] [<ffffffff81891963>] kobject_add_internal+0x58/0x2c4 [ 115.274556] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e [ 115.274559] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd [ 115.274563] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274564] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35 [ 115.274566] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274567] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50 [ 115.274569] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180 [ 115.274571] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274573] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad [ 115.274577] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14 [ 115.274579] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad [ 115.274581] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199 [ 115.274583] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba [ 115.274587] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0 [ 115.274589] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2 [ 115.274590] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad [ 115.274593] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82 [ 115.274595] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b [ 115.274597] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef [ 115.274599] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef [ 115.274601] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f [ 115.274603] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd [ 115.274605] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f [ 115.274607] [<ffffffff8116185b>] kthread+0xc5/0xcd [ 115.274609] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8 [ 115.274611] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274615] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70 [ 115.274616] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274618] ---[ end trace 3d275ea9d9277b89 ]--- [ 115.274619] ------------[ cut here ]------------ [ 115.274621] WARNING: CPU: 0 PID: 4 at include/linux/kref.h:47 kobject_get+0x5d/0x6a() [ 115.274622] Modules linked in: [ 115.274623] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59 [ 115.274624] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 115.274626] Workqueue: events work_for_cpu_fn [ 115.274628] 0000000000000000 ffff88017d2b79f8 ffffffff8188f38b 0000000000000000 [ 115.274630] ffff88017d2b7a30 ffffffff81144593 ffffffff818912c9 ffffffff86c28700 [ 115.274632] 0000000000000000 ffffffff86c28700 00000000007f4000 ffff88017d2b7a40 [ 115.274632] Call Trace: [ 115.274634] [<ffffffff8188f38b>] dump_stack+0x4b/0x64 [ 115.274635] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8 [ 115.274637] [<ffffffff818912c9>] ? kobject_get+0x5d/0x6a [ 115.274638] [<ffffffff8114465a>] warn_slowpath_null+0x1a/0x1c [ 115.274640] [<ffffffff818912c9>] kobject_get+0x5d/0x6a [ 115.274641] [<ffffffff81891963>] kobject_add_internal+0x58/0x2c4 [ 115.274642] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e [ 115.274644] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd [ 115.274645] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274647] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35 [ 115.274648] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274650] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50 [ 115.274651] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180 [ 115.274652] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274654] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad [ 115.274655] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14 [ 115.274657] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad [ 115.274658] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199 [ 115.274660] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba [ 115.274662] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0 [ 115.274663] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2 [ 115.274665] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad [ 115.274666] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82 [ 115.274668] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b [ 115.274669] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef [ 115.274671] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef [ 115.274673] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f [ 115.274675] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd [ 115.274676] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f [ 115.274678] [<ffffffff8116185b>] kthread+0xc5/0xcd [ 115.274679] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8 [ 115.274681] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274683] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70 [ 115.274684] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274685] ---[ end trace 3d275ea9d9277b8a ]--- [ 115.274686] ------------[ cut here ]------------ [ 115.274688] WARNING: CPU: 0 PID: 4 at lib/kobject.c:674 kobject_put+0x33/0x47() [ 115.274689] kobject: 'ttm' (ffffffff86c28700): is not initialized, yet kobject_put() is being called. [ 115.274690] Modules linked in: [ 115.274691] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59 [ 115.274691] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 115.274693] Workqueue: events work_for_cpu_fn [ 115.274695] 0000000000000000 ffff88017d2b79a8 ffffffff8188f38b ffff88017d2b79f0 [ 115.274697] ffff88017d2b79e0 ffffffff81144593 ffffffff81891309 ffffffff86c28700 [ 115.274699] ffffffff86c28700 00000000fffffffe 00000000007f4000 ffff88017d2b7a40 [ 115.274700] Call Trace: [ 115.274701] [<ffffffff8188f38b>] dump_stack+0x4b/0x64 [ 115.274703] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8 [ 115.274705] [<ffffffff81891309>] ? kobject_put+0x33/0x47 [ 115.274706] [<ffffffff811445f8>] warn_slowpath_fmt+0x4c/0x4e [ 115.274708] [<ffffffff81891309>] kobject_put+0x33/0x47 [ 115.274710] [<ffffffff81891ba6>] kobject_add_internal+0x29b/0x2c4 [ 115.274711] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e [ 115.274712] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd [ 115.274714] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274715] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35 [ 115.274717] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274718] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50 [ 115.274719] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180 [ 115.274721] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274722] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad [ 115.274724] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14 [ 115.274725] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad [ 115.274727] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199 [ 115.274728] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba [ 115.274730] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0 [ 115.274731] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2 [ 115.274733] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad [ 115.274734] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82 [ 115.274736] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b [ 115.274737] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef [ 115.274739] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef [ 115.274741] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f [ 115.274743] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd [ 115.274745] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f [ 115.274746] [<ffffffff8116185b>] kthread+0xc5/0xcd [ 115.274747] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8 [ 115.274749] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274751] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70 [ 115.274752] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274753] ---[ end trace 3d275ea9d9277b8b ]--- [ 115.274763] ------------[ cut here ]------------ [ 115.274764] WARNING: CPU: 0 PID: 4 at lib/kobject.c:244 kobject_add_internal+0x281/0x2c4() [ 115.274765] kobject_add_internal failed for memory_accounting (error: -2 parent: kkkkkkk���������� [ 115.274765] �����������V�(�����b�(������ȉ��������������ہ����V�R������!) [ 115.274766] Modules linked in: [ 115.274767] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59 [ 115.274768] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 115.274769] Workqueue: events work_for_cpu_fn [ 115.274771] 0000000000000000 ffff88017d2b79c0 ffffffff8188f38b ffff88017d2b7a08 [ 115.274773] ffff88017d2b79f8 ffffffff81144593 ffffffff81891b8c ffff88041821e270 [ 115.274775] ffffffff86c28700 00000000fffffffe 00000000007f4000 ffff88017d2b7a58 [ 115.274776] Call Trace: [ 115.274777] [<ffffffff8188f38b>] dump_stack+0x4b/0x64 [ 115.274779] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8 [ 115.274780] [<ffffffff81891b8c>] ? kobject_add_internal+0x281/0x2c4 [ 115.274781] [<ffffffff811445f8>] warn_slowpath_fmt+0x4c/0x4e [ 115.274782] [<ffffffff81891b8c>] kobject_add_internal+0x281/0x2c4 [ 115.274784] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e [ 115.274785] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd [ 115.274787] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274788] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35 [ 115.274790] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274792] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50 [ 115.274793] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180 [ 115.274795] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31 [ 115.274796] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad [ 115.274798] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14 [ 115.274799] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad [ 115.274801] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199 [ 115.274803] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba [ 115.274805] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0 [ 115.274806] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2 [ 115.274808] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad [ 115.274809] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82 [ 115.274810] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b [ 115.274812] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef [ 115.274814] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef [ 115.274816] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f [ 115.274817] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd [ 115.274819] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f [ 115.274820] [<ffffffff8116185b>] kthread+0xc5/0xcd [ 115.274822] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8 [ 115.274824] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274825] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70 [ 115.274827] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274828] ---[ end trace 3d275ea9d9277b8c ]--- [ 115.274847] [drm:mgag200_mm_init] *ERROR* Failed setting up TTM memory accounting subsystem. [ 115.274853] BUG: unable to handle kernel NULL pointer dereference at (null) [ 115.274856] IP: [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc [ 115.274858] PGD 0 [ 115.274860] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN [ 115.274861] Modules linked in: [ 115.274862] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59 [ 115.274863] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 115.274865] Workqueue: events work_for_cpu_fn [ 115.274865] task: ffff88017d2a8000 ti: ffff88017d2b0000 task.ti: ffff88017d2b0000 [ 115.274868] RIP: 0010:[<ffffffff81b88285>] [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc [ 115.274868] RSP: 0000:ffff88017d2b7bd8 EFLAGS: 00010246 [ 115.274869] RAX: 0000000000000000 RBX: ffff8800ba0a4520 RCX: ffffffff81186ff1 [ 115.274870] RDX: ffff88017d2b7a90 RSI: ffffffff83d73579 RDI: ffff8800ba0a4520 [ 115.274870] RBP: ffff88017d2b7bf0 R08: 0000000000000001 R09: 0000000000000000 [ 115.274871] R10: 0000000000075000 R11: ffffffff85147a82 R12: ffff8800ba0a4520 [ 115.274872] R13: ffff8800ba0a4da8 R14: 00000000fffffffe R15: ffff8800ba0a3400 [ 115.274873] FS: 0000000000000000(0000) GS:ffff880420e00000(0000) knlGS:0000000000000000 [ 115.274874] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 115.274875] CR2: 0000000000000000 CR3: 0000000005e2d000 CR4: 00000000001406f0 [ 115.274876] Stack: [ 115.274877] ffff8800ba0a3400 ffff8800ba0a4520 00000000fffffffe ffff88017d2b7c10 [ 115.274879] ffffffff81cb6a3e ffff8800ba0a4520 ffff8800ba0a3400 ffff88017d2b7c78 [ 115.274881] ffffffff81cb6efe 0000072001000000 000000000000aa55 0000075b00000000 [ 115.274881] Call Trace: [ 115.274883] [<ffffffff81cb6a3e>] mgag200_driver_unload+0x30/0x48 [ 115.274884] [<ffffffff81cb6efe>] mgag200_driver_load+0x4a8/0x4ba [ 115.274886] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0 [ 115.274887] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2 [ 115.274889] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad [ 115.274890] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82 [ 115.274891] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b [ 115.274893] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef [ 115.274895] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef [ 115.274897] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f [ 115.274898] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd [ 115.274901] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f [ 115.274902] [<ffffffff8116185b>] kthread+0xc5/0xcd [ 115.274904] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8 [ 115.274906] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274908] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70 [ 115.274910] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24 [ 115.274928] Code: 00 49 83 c0 28 e8 c9 fd ff ff 5d c3 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 48 8b 87 88 08 00 00 48 89 fb 4c 8d ab 88 08 00 00 <4c> 8b 20 48 8d 78 f8 49 83 ec 08 eb 13 48 8b 47 50 ff 50 08 49 [ 115.274930] RIP [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc [ 115.274931] RSP <ffff88017d2b7bd8> [ 115.274932] CR2: 0000000000000000 [ 115.274934] ---[ end trace 3d275ea9d9277b8d ]--- [ 115.284475] kworker/0:0 (4) used greatest stack depth: 29320 bytes left [ 115.284480] BUG: unable to handle kernel paging request at ffffffffffffff98 [ 115.284483] IP: [<ffffffff81161a7d>] kthread_data+0x10/0x16 [ 115.284484] PGD 5e30067 PUD 5e32067 PMD 0 [ 115.284486] Oops: 0000 [#2] SMP DEBUG_PAGEALLOC KASAN
On 9/17/2015 2:04 PM, Ingo Molnar wrote:
- Ingo Molnar mingo@kernel.org wrote:
So this patch was whitespace damaged - I applied it by hand and made the commit
below. This has solved the crash, thanks Archit!
Spoke too soon - the attached (allyesconfig-ish) config still crashes, first there
are a handful of kobject debug warnings, then:
The error handling in the driver is bad. The main problem is that the driver_load op calls mgag200_driver_unload if anything fails, which doesn't work well if driver_load fails mid way.
I'll post out patches to fix this. But you'll need to undo the patch I'd sent previously.
Thanks, Archit
[ 115.274847] [drm:mgag200_mm_init] *ERROR* Failed setting up TTM memory accounting subsystem.
[ 115.274853] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 115.274856] IP: [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc
[ 115.274858] PGD 0
[ 115.274860] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
[ 115.274861] Modules linked in:
[ 115.274862] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59
[ 115.274863] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
[ 115.274865] Workqueue: events work_for_cpu_fn
[ 115.274865] task: ffff88017d2a8000 ti: ffff88017d2b0000 task.ti: ffff88017d2b0000
[ 115.274868] RIP: 0010:[<ffffffff81b88285>] [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc
[ 115.274868] RSP: 0000:ffff88017d2b7bd8 EFLAGS: 00010246
[ 115.274869] RAX: 0000000000000000 RBX: ffff8800ba0a4520 RCX: ffffffff81186ff1
[ 115.274870] RDX: ffff88017d2b7a90 RSI: ffffffff83d73579 RDI: ffff8800ba0a4520
[ 115.274870] RBP: ffff88017d2b7bf0 R08: 0000000000000001 R09: 0000000000000000
[ 115.274871] R10: 0000000000075000 R11: ffffffff85147a82 R12: ffff8800ba0a4520
[ 115.274872] R13: ffff8800ba0a4da8 R14: 00000000fffffffe R15: ffff8800ba0a3400
[ 115.274873] FS: 0000000000000000(0000) GS:ffff880420e00000(0000) knlGS:0000000000000000
[ 115.274874] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 115.274875] CR2: 0000000000000000 CR3: 0000000005e2d000 CR4: 00000000001406f0
[ 115.274876] Stack:
[ 115.274877] ffff8800ba0a3400 ffff8800ba0a4520 00000000fffffffe ffff88017d2b7c10
[ 115.274879] ffffffff81cb6a3e ffff8800ba0a4520 ffff8800ba0a3400 ffff88017d2b7c78
[ 115.274881] ffffffff81cb6efe 0000072001000000 000000000000aa55 0000075b00000000
[ 115.274881] Call Trace:
[ 115.274883] [<ffffffff81cb6a3e>] mgag200_driver_unload+0x30/0x48
[ 115.274884] [<ffffffff81cb6efe>] mgag200_driver_load+0x4a8/0x4ba
[ 115.274886] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0
[ 115.274887] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2
[ 115.274889] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad
[ 115.274890] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82
[ 115.274891] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b
[ 115.274893] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef
[ 115.274895] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef
[ 115.274897] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
Full log is below, config attached as well.
Thanks,
Ingo
========================>
[ 115.243547] mgag200 0000:0b:00.0: no default pinctrl state
[ 115.243732] devices_kset: Moving 0000:0b:00.0 to end of list
[ 115.247078] device: 'controlD64': device_add
[ 115.247494] PM: Adding info for No Bus:controlD64
[ 115.247979] device: 'card0': device_add
[ 115.248315] PM: Adding info for No Bus:card0
[ 115.274511] ------------[ cut here ]------------
[ 115.274518] WARNING: CPU: 0 PID: 4 at lib/kobject.c:582 kobject_get+0x33/0x6a()
[ 115.274519] kobject: 'ttm' (ffffffff86c28700): is not initialized, yet kobject_get() is being called.
[ 115.274521] Modules linked in:
[ 115.274524] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59
[ 115.274525] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
[ 115.274529] Workqueue: events work_for_cpu_fn
[ 115.274532] 0000000000000000 ffff88017d2b79a8 ffffffff8188f38b ffff88017d2b79f0
[ 115.274534] ffff88017d2b79e0 ffffffff81144593 ffffffff8189129f ffffffff86c28700
[ 115.274536] 0000000000000000 ffffffff86c28700 00000000007f4000 ffff88017d2b7a40
[ 115.274537] Call Trace:
[ 115.274540] [<ffffffff8188f38b>] dump_stack+0x4b/0x64
[ 115.274543] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8
[ 115.274545] [<ffffffff8189129f>] ? kobject_get+0x33/0x6a
[ 115.274547] [<ffffffff811445f8>] warn_slowpath_fmt+0x4c/0x4e
[ 115.274551] [<ffffffff811892de>] ? lock_is_held+0x55/0x66
[ 115.274553] [<ffffffff8189129f>] kobject_get+0x33/0x6a
[ 115.274554] [<ffffffff81891963>] kobject_add_internal+0x58/0x2c4
[ 115.274556] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e
[ 115.274559] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd
[ 115.274563] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274564] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35
[ 115.274566] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274567] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50
[ 115.274569] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180
[ 115.274571] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274573] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad
[ 115.274577] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14
[ 115.274579] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad
[ 115.274581] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199
[ 115.274583] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba
[ 115.274587] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0
[ 115.274589] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2
[ 115.274590] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad
[ 115.274593] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82
[ 115.274595] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b
[ 115.274597] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef
[ 115.274599] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef
[ 115.274601] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
[ 115.274603] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd
[ 115.274605] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f
[ 115.274607] [<ffffffff8116185b>] kthread+0xc5/0xcd
[ 115.274609] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8
[ 115.274611] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274615] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70
[ 115.274616] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274618] ---[ end trace 3d275ea9d9277b89 ]---
[ 115.274619] ------------[ cut here ]------------
[ 115.274621] WARNING: CPU: 0 PID: 4 at include/linux/kref.h:47 kobject_get+0x5d/0x6a()
[ 115.274622] Modules linked in:
[ 115.274623] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59
[ 115.274624] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
[ 115.274626] Workqueue: events work_for_cpu_fn
[ 115.274628] 0000000000000000 ffff88017d2b79f8 ffffffff8188f38b 0000000000000000
[ 115.274630] ffff88017d2b7a30 ffffffff81144593 ffffffff818912c9 ffffffff86c28700
[ 115.274632] 0000000000000000 ffffffff86c28700 00000000007f4000 ffff88017d2b7a40
[ 115.274632] Call Trace:
[ 115.274634] [<ffffffff8188f38b>] dump_stack+0x4b/0x64
[ 115.274635] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8
[ 115.274637] [<ffffffff818912c9>] ? kobject_get+0x5d/0x6a
[ 115.274638] [<ffffffff8114465a>] warn_slowpath_null+0x1a/0x1c
[ 115.274640] [<ffffffff818912c9>] kobject_get+0x5d/0x6a
[ 115.274641] [<ffffffff81891963>] kobject_add_internal+0x58/0x2c4
[ 115.274642] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e
[ 115.274644] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd
[ 115.274645] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274647] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35
[ 115.274648] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274650] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50
[ 115.274651] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180
[ 115.274652] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274654] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad
[ 115.274655] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14
[ 115.274657] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad
[ 115.274658] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199
[ 115.274660] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba
[ 115.274662] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0
[ 115.274663] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2
[ 115.274665] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad
[ 115.274666] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82
[ 115.274668] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b
[ 115.274669] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef
[ 115.274671] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef
[ 115.274673] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
[ 115.274675] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd
[ 115.274676] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f
[ 115.274678] [<ffffffff8116185b>] kthread+0xc5/0xcd
[ 115.274679] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8
[ 115.274681] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274683] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70
[ 115.274684] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274685] ---[ end trace 3d275ea9d9277b8a ]---
[ 115.274686] ------------[ cut here ]------------
[ 115.274688] WARNING: CPU: 0 PID: 4 at lib/kobject.c:674 kobject_put+0x33/0x47()
[ 115.274689] kobject: 'ttm' (ffffffff86c28700): is not initialized, yet kobject_put() is being called.
[ 115.274690] Modules linked in:
[ 115.274691] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59
[ 115.274691] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
[ 115.274693] Workqueue: events work_for_cpu_fn
[ 115.274695] 0000000000000000 ffff88017d2b79a8 ffffffff8188f38b ffff88017d2b79f0
[ 115.274697] ffff88017d2b79e0 ffffffff81144593 ffffffff81891309 ffffffff86c28700
[ 115.274699] ffffffff86c28700 00000000fffffffe 00000000007f4000 ffff88017d2b7a40
[ 115.274700] Call Trace:
[ 115.274701] [<ffffffff8188f38b>] dump_stack+0x4b/0x64
[ 115.274703] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8
[ 115.274705] [<ffffffff81891309>] ? kobject_put+0x33/0x47
[ 115.274706] [<ffffffff811445f8>] warn_slowpath_fmt+0x4c/0x4e
[ 115.274708] [<ffffffff81891309>] kobject_put+0x33/0x47
[ 115.274710] [<ffffffff81891ba6>] kobject_add_internal+0x29b/0x2c4
[ 115.274711] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e
[ 115.274712] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd
[ 115.274714] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274715] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35
[ 115.274717] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274718] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50
[ 115.274719] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180
[ 115.274721] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274722] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad
[ 115.274724] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14
[ 115.274725] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad
[ 115.274727] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199
[ 115.274728] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba
[ 115.274730] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0
[ 115.274731] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2
[ 115.274733] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad
[ 115.274734] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82
[ 115.274736] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b
[ 115.274737] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef
[ 115.274739] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef
[ 115.274741] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
[ 115.274743] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd
[ 115.274745] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f
[ 115.274746] [<ffffffff8116185b>] kthread+0xc5/0xcd
[ 115.274747] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8
[ 115.274749] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274751] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70
[ 115.274752] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274753] ---[ end trace 3d275ea9d9277b8b ]---
[ 115.274763] ------------[ cut here ]------------
[ 115.274764] WARNING: CPU: 0 PID: 4 at lib/kobject.c:244 kobject_add_internal+0x281/0x2c4()
[ 115.274765] kobject_add_internal failed for memory_accounting (error: -2 parent: kkkkkkk����������
[ 115.274765] �����������V�(�����b�(������ȉ��������������ہ����V�R������!)
[ 115.274766] Modules linked in:
[ 115.274767] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59
[ 115.274768] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
[ 115.274769] Workqueue: events work_for_cpu_fn
[ 115.274771] 0000000000000000 ffff88017d2b79c0 ffffffff8188f38b ffff88017d2b7a08
[ 115.274773] ffff88017d2b79f8 ffffffff81144593 ffffffff81891b8c ffff88041821e270
[ 115.274775] ffffffff86c28700 00000000fffffffe 00000000007f4000 ffff88017d2b7a58
[ 115.274776] Call Trace:
[ 115.274777] [<ffffffff8188f38b>] dump_stack+0x4b/0x64
[ 115.274779] [<ffffffff81144593>] warn_slowpath_common+0x9f/0xb8
[ 115.274780] [<ffffffff81891b8c>] ? kobject_add_internal+0x281/0x2c4
[ 115.274781] [<ffffffff811445f8>] warn_slowpath_fmt+0x4c/0x4e
[ 115.274782] [<ffffffff81891b8c>] kobject_add_internal+0x281/0x2c4
[ 115.274784] [<ffffffff81891c42>] kobject_init_and_add+0x73/0x7e
[ 115.274785] [<ffffffff81b981cf>] ttm_mem_global_init+0xc6/0x2cd
[ 115.274787] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274788] [<ffffffff81290029>] ? kasan_unpoison_shadow+0x14/0x35
[ 115.274790] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274792] [<ffffffff81290095>] ? kasan_kmalloc+0x4b/0x50
[ 115.274793] [<ffffffff8128ccdc>] ? __kmalloc+0x13e/0x180
[ 115.274795] [<ffffffff8128f809>] ? kasan_poison_shadow+0x2f/0x31
[ 115.274796] [<ffffffff81b910fc>] ? drm_global_item_ref+0x67/0xad
[ 115.274798] [<ffffffff81cbb766>] mgag200_ttm_mem_global_init+0x12/0x14
[ 115.274799] [<ffffffff81b91113>] drm_global_item_ref+0x7e/0xad
[ 115.274801] [<ffffffff81cbb82d>] mgag200_mm_init+0x50/0x199
[ 115.274803] [<ffffffff81cb6da0>] mgag200_driver_load+0x34a/0x4ba
[ 115.274805] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0
[ 115.274806] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2
[ 115.274808] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad
[ 115.274809] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82
[ 115.274810] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b
[ 115.274812] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef
[ 115.274814] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef
[ 115.274816] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
[ 115.274817] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd
[ 115.274819] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f
[ 115.274820] [<ffffffff8116185b>] kthread+0xc5/0xcd
[ 115.274822] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8
[ 115.274824] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274825] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70
[ 115.274827] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274828] ---[ end trace 3d275ea9d9277b8c ]---
[ 115.274847] [drm:mgag200_mm_init] *ERROR* Failed setting up TTM memory accounting subsystem.
[ 115.274853] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 115.274856] IP: [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc
[ 115.274858] PGD 0
[ 115.274860] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
[ 115.274861] Modules linked in:
[ 115.274862] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W L 4.3.0-rc1-01729-g525850e-dirty #59
[ 115.274863] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
[ 115.274865] Workqueue: events work_for_cpu_fn
[ 115.274865] task: ffff88017d2a8000 ti: ffff88017d2b0000 task.ti: ffff88017d2b0000
[ 115.274868] RIP: 0010:[<ffffffff81b88285>] [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc
[ 115.274868] RSP: 0000:ffff88017d2b7bd8 EFLAGS: 00010246
[ 115.274869] RAX: 0000000000000000 RBX: ffff8800ba0a4520 RCX: ffffffff81186ff1
[ 115.274870] RDX: ffff88017d2b7a90 RSI: ffffffff83d73579 RDI: ffff8800ba0a4520
[ 115.274870] RBP: ffff88017d2b7bf0 R08: 0000000000000001 R09: 0000000000000000
[ 115.274871] R10: 0000000000075000 R11: ffffffff85147a82 R12: ffff8800ba0a4520
[ 115.274872] R13: ffff8800ba0a4da8 R14: 00000000fffffffe R15: ffff8800ba0a3400
[ 115.274873] FS: 0000000000000000(0000) GS:ffff880420e00000(0000) knlGS:0000000000000000
[ 115.274874] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 115.274875] CR2: 0000000000000000 CR3: 0000000005e2d000 CR4: 00000000001406f0
[ 115.274876] Stack:
[ 115.274877] ffff8800ba0a3400 ffff8800ba0a4520 00000000fffffffe ffff88017d2b7c10
[ 115.274879] ffffffff81cb6a3e ffff8800ba0a4520 ffff8800ba0a3400 ffff88017d2b7c78
[ 115.274881] ffffffff81cb6efe 0000072001000000 000000000000aa55 0000075b00000000
[ 115.274881] Call Trace:
[ 115.274883] [<ffffffff81cb6a3e>] mgag200_driver_unload+0x30/0x48
[ 115.274884] [<ffffffff81cb6efe>] mgag200_driver_load+0x4a8/0x4ba
[ 115.274886] [<ffffffff81b80055>] drm_dev_register+0x6f/0xb0
[ 115.274887] [<ffffffff81b82865>] drm_get_pci_dev+0xff/0x1c2
[ 115.274889] [<ffffffff81cbaaed>] mga_pci_probe+0xa6/0xad
[ 115.274890] [<ffffffff8190e877>] local_pci_probe+0x3d/0x82
[ 115.274891] [<ffffffff81158451>] work_for_cpu_fn+0x14/0x1b
[ 115.274893] [<ffffffff8115bf66>] process_one_work+0x28e/0x4ef
[ 115.274895] [<ffffffff8115be48>] ? process_one_work+0x170/0x4ef
[ 115.274897] [<ffffffff8115c1e8>] process_scheduled_works+0x21/0x2f
[ 115.274898] [<ffffffff8115c3f1>] worker_thread+0x1fb/0x2bd
[ 115.274901] [<ffffffff8115c1f6>] ? process_scheduled_works+0x2f/0x2f
[ 115.274902] [<ffffffff8116185b>] kthread+0xc5/0xcd
[ 115.274904] [<ffffffff8118992e>] ? lock_release+0x3a5/0x3f8
[ 115.274906] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274908] [<ffffffff83d741af>] ret_from_fork+0x3f/0x70
[ 115.274910] [<ffffffff81161796>] ? kthread_parkme+0x24/0x24
[ 115.274928] Code: 00 49 83 c0 28 e8 c9 fd ff ff 5d c3 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 48 8b 87 88 08 00 00 48 89 fb 4c 8d ab 88 08 00 00 <4c> 8b 20 48 8d 78 f8 49 83 ec 08 eb 13 48 8b 47 50 ff 50 08 49
[ 115.274930] RIP [<ffffffff81b88285>] drm_mode_config_cleanup+0x1f/0x1cc
[ 115.274931] RSP <ffff88017d2b7bd8>
[ 115.274932] CR2: 0000000000000000
[ 115.274934] ---[ end trace 3d275ea9d9277b8d ]---
[ 115.284475] kworker/0:0 (4) used greatest stack depth: 29320 bytes left
[ 115.284480] BUG: unable to handle kernel paging request at ffffffffffffff98
[ 115.284483] IP: [<ffffffff81161a7d>] kthread_data+0x10/0x16
[ 115.284484] PGD 5e30067 PUD 5e32067 PMD 0
[ 115.284486] Oops: 0000 [#2] SMP DEBUG_PAGEALLOC KASAN
On Thu, Sep 17, 2015 at 04:24:21PM +0530, Archit Taneja wrote:
On 9/17/2015 2:04 PM, Ingo Molnar wrote:
- Ingo Molnar mingo@kernel.org wrote:
So this patch was whitespace damaged - I applied it by hand and made the commit
below. This has solved the crash, thanks Archit!
Spoke too soon - the attached (allyesconfig-ish) config still crashes, first there
are a handful of kobject debug warnings, then:
The error handling in the driver is bad. The main problem is that the driver_load op calls mgag200_driver_unload if anything fails, which doesn't work well if driver_load fails mid way.
mgag200_driver_unload is trying to unload everything evenif that has not succeeded in initializing. Here the ttm failed to initialize but still mgag200_mm_fini was called to unload it.
regards sudip
* Archit Taneja architt@codeaurora.org wrote:
On 9/17/2015 2:04 PM, Ingo Molnar wrote:
- Ingo Molnar mingo@kernel.org wrote:
So this patch was whitespace damaged - I applied it by hand and made the commit
below. This has solved the crash, thanks Archit!
Spoke too soon - the attached (allyesconfig-ish) config still crashes, first there
are a handful of kobject debug warnings, then:
The error handling in the driver is bad. The main problem is that the driver_load op calls mgag200_driver_unload if anything fails, which doesn't work well if driver_load fails mid way.
I'll post out patches to fix this. But you'll need to undo the patch I'd sent previously.
Thanks, with Linus's latest kernel that has your fixes included I can no longer reproduce the crash.
The MGAG200 driver still generates the following kobject warnings:
[ 269.353392] calling mgag200_init+0x0/0x3b @ 1 [ 269.358702] bus: 'pci': add driver mgag200 [ 269.363760] bus: 'pci': driver_probe_device: matched device 0000:0b:00.0 with driver mgag200 [ 269.373748] bus: 'pci': really_probe: probing driver mgag200 with device 0000:0b:00.0 [ 269.383073] mgag200 0000:0b:00.0: no default pinctrl state [ 269.389590] devices_kset: Moving 0000:0b:00.0 to end of list [ 269.399437] device: 'controlD64': device_add [ 269.404901] PM: Adding info for No Bus:controlD64 [ 269.410986] device: 'card0': device_add [ 269.415877] PM: Adding info for No Bus:card0 [ 269.431210] ------------[ cut here ]------------ [ 269.436655] WARNING: CPU: 0 PID: 230 at lib/kobject.c:582 kobject_get+0x33/0x6a() [ 269.445503] kobject: 'ttm' (ffffffff86c288b0): is not initialized, yet kobject_get() is being called. [ 269.456290] Modules linked in: [ 269.460057] CPU: 0 PID: 230 Comm: kworker/0:1 Tainted: G W L 4.3.0-rc3-02057-g77880ef-dirty #183 [ 269.471428] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 269.483389] Workqueue: events work_for_cpu_fn [ 269.488612] 0000000000000000 ffff88041fabf9a8 ffffffff81892127 ffff88041fabf9f0 [ 269.497809] ffff88041fabf9e0 ffffffff81145b0f ffffffff8189405f ffffffff86c288b0 [ 269.506882] 0000000000000000 ffffffff86c288b0 0000000000ff0000 ffff88041fabfa40 [ 269.515943] Call Trace: [ 269.518951] [<ffffffff81892127>] dump_stack+0x4b/0x64 [ 269.524975] [<ffffffff81145b0f>] warn_slowpath_common+0x9f/0xb8 [ 269.531970] [<ffffffff8189405f>] ? kobject_get+0x33/0x6a [ 269.538271] [<ffffffff81145b74>] warn_slowpath_fmt+0x4c/0x4e [ 269.544976] [<ffffffff8118a84a>] ? lock_is_held+0x55/0x66 [ 269.551382] [<ffffffff8189405f>] kobject_get+0x33/0x6a [ 269.557500] [<ffffffff81894723>] kobject_add_internal+0x58/0x2c4 [ 269.564589] [<ffffffff81894a02>] kobject_init_and_add+0x73/0x7e [ 269.571586] [<ffffffff81b9ba3f>] ttm_mem_global_init+0xc6/0x2cd [ 269.578583] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 269.585674] [<ffffffff81291f09>] ? kasan_unpoison_shadow+0x14/0x35 [ 269.592958] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 269.600044] [<ffffffff81291f75>] ? kasan_kmalloc+0x4b/0x50 [ 269.606544] [<ffffffff8128ebc4>] ? __kmalloc+0x13e/0x180 [ 269.612856] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 269.619945] [<ffffffff81b9496c>] ? drm_global_item_ref+0x67/0xad [ 269.627056] [<ffffffff81cbf3c2>] mgag200_ttm_mem_global_init+0x12/0x14 [ 269.634725] [<ffffffff81b94983>] drm_global_item_ref+0x7e/0xad [ 269.641619] [<ffffffff81cbf489>] mgag200_mm_init+0x50/0x199 [ 269.648223] [<ffffffff81cba964>] mgag200_driver_load+0x34a/0x4c7 [ 269.655316] [<ffffffff81b838ad>] drm_dev_register+0x6f/0xb0 [ 269.661923] [<ffffffff81b860d5>] drm_get_pci_dev+0xff/0x1c2 [ 269.668526] [<ffffffff81cbe709>] mga_pci_probe+0xa6/0xad [ 269.674840] [<ffffffff81911f27>] local_pci_probe+0x3d/0x82 [ 269.685976] [<ffffffff811599c1>] work_for_cpu_fn+0x14/0x1b [ 269.692622] [<ffffffff8115d50b>] process_one_work+0x28e/0x4ef [ 269.699424] [<ffffffff8115d3ed>] ? process_one_work+0x170/0x4ef [ 269.706438] [<ffffffff8115d78d>] process_scheduled_works+0x21/0x2f [ 269.713728] [<ffffffff8115dc06>] worker_thread+0x1fb/0x2bd [ 269.720238] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 269.727815] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 269.735395] [<ffffffff81162dcb>] kthread+0xc5/0xcd [ 269.741118] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 269.747727] [<ffffffff83d556ef>] ret_from_fork+0x3f/0x70 [ 269.754041] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 269.760641] ---[ end trace 0609b8147f0ef5df ]--- [ 269.766074] ------------[ cut here ]------------ [ 269.771499] WARNING: CPU: 0 PID: 230 at include/linux/kref.h:47 kobject_get+0x5d/0x6a() [ 269.780921] Modules linked in: [ 269.784691] CPU: 0 PID: 230 Comm: kworker/0:1 Tainted: G W L 4.3.0-rc3-02057-g77880ef-dirty #183 [ 269.796062] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 269.808019] Workqueue: events work_for_cpu_fn [ 269.813274] 0000000000000000 ffff88041fabf9f8 ffffffff81892127 0000000000000000 [ 269.822347] ffff88041fabfa30 ffffffff81145b0f ffffffff81894089 ffffffff86c288b0 [ 269.831405] 0000000000000000 ffffffff86c288b0 0000000000ff0000 ffff88041fabfa40 [ 269.840455] Call Trace: [ 269.843459] [<ffffffff81892127>] dump_stack+0x4b/0x64 [ 269.849477] [<ffffffff81145b0f>] warn_slowpath_common+0x9f/0xb8 [ 269.856468] [<ffffffff81894089>] ? kobject_get+0x5d/0x6a [ 269.862783] [<ffffffff81145bd6>] warn_slowpath_null+0x1a/0x1c [ 269.869571] [<ffffffff81894089>] kobject_get+0x5d/0x6a [ 269.875690] [<ffffffff81894723>] kobject_add_internal+0x58/0x2c4 [ 269.882784] [<ffffffff81894a02>] kobject_init_and_add+0x73/0x7e [ 269.889778] [<ffffffff81b9ba3f>] ttm_mem_global_init+0xc6/0x2cd [ 269.896770] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 269.903865] [<ffffffff81291f09>] ? kasan_unpoison_shadow+0x14/0x35 [ 269.911147] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 269.918228] [<ffffffff81291f75>] ? kasan_kmalloc+0x4b/0x50 [ 269.924731] [<ffffffff8128ebc4>] ? __kmalloc+0x13e/0x180 [ 269.931046] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 269.938136] [<ffffffff81b9496c>] ? drm_global_item_ref+0x67/0xad [ 269.945226] [<ffffffff81cbf3c2>] mgag200_ttm_mem_global_init+0x12/0x14 [ 269.952903] [<ffffffff81b94983>] drm_global_item_ref+0x7e/0xad [ 269.959797] [<ffffffff81cbf489>] mgag200_mm_init+0x50/0x199 [ 269.966400] [<ffffffff81cba964>] mgag200_driver_load+0x34a/0x4c7 [ 269.973489] [<ffffffff81b838ad>] drm_dev_register+0x6f/0xb0 [ 269.980091] [<ffffffff81b860d5>] drm_get_pci_dev+0xff/0x1c2 [ 269.986698] [<ffffffff81cbe709>] mga_pci_probe+0xa6/0xad [ 269.993013] [<ffffffff81911f27>] local_pci_probe+0x3d/0x82 [ 269.999519] [<ffffffff811599c1>] work_for_cpu_fn+0x14/0x1b [ 270.006025] [<ffffffff8115d50b>] process_one_work+0x28e/0x4ef [ 270.012826] [<ffffffff8115d3ed>] ? process_one_work+0x170/0x4ef [ 270.019818] [<ffffffff8115d78d>] process_scheduled_works+0x21/0x2f [ 270.027100] [<ffffffff8115dc06>] worker_thread+0x1fb/0x2bd [ 270.033606] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 270.041182] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 270.048758] [<ffffffff81162dcb>] kthread+0xc5/0xcd [ 270.054491] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 270.061096] [<ffffffff83d556ef>] ret_from_fork+0x3f/0x70 [ 270.067409] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 270.074012] ---[ end trace 0609b8147f0ef5e0 ]--- [ 270.079448] ------------[ cut here ]------------ [ 270.084882] WARNING: CPU: 0 PID: 230 at lib/kobject.c:674 kobject_put+0x33/0x47() [ 270.093723] kobject: 'ttm' (ffffffff86c288b0): is not initialized, yet kobject_put() is being called. [ 270.104503] Modules linked in: [ 270.108272] CPU: 0 PID: 230 Comm: kworker/0:1 Tainted: G W L 4.3.0-rc3-02057-g77880ef-dirty #183 [ 270.119648] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 270.131604] Workqueue: events work_for_cpu_fn [ 270.136828] 0000000000000000 ffff88041fabf9a8 ffffffff81892127 ffff88041fabf9f0 [ 270.145900] ffff88041fabf9e0 ffffffff81145b0f ffffffff818940c9 ffffffff86c288b0 [ 270.154971] ffffffff86c288b0 00000000fffffffe 0000000000ff0000 ffff88041fabfa40 [ 270.164021] Call Trace: [ 270.167026] [<ffffffff81892127>] dump_stack+0x4b/0x64 [ 270.173045] [<ffffffff81145b0f>] warn_slowpath_common+0x9f/0xb8 [ 270.180036] [<ffffffff818940c9>] ? kobject_put+0x33/0x47 [ 270.186349] [<ffffffff81145b74>] warn_slowpath_fmt+0x4c/0x4e [ 270.193099] [<ffffffff818940c9>] kobject_put+0x33/0x47 [ 270.199217] [<ffffffff81894966>] kobject_add_internal+0x29b/0x2c4 [ 270.206405] [<ffffffff81894a02>] kobject_init_and_add+0x73/0x7e [ 270.213401] [<ffffffff81b9ba3f>] ttm_mem_global_init+0xc6/0x2cd [ 270.220385] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 270.227473] [<ffffffff81291f09>] ? kasan_unpoison_shadow+0x14/0x35 [ 270.234755] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 270.241844] [<ffffffff81291f75>] ? kasan_kmalloc+0x4b/0x50 [ 270.248347] [<ffffffff8128ebc4>] ? __kmalloc+0x13e/0x180 [ 270.254678] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 270.261769] [<ffffffff81b9496c>] ? drm_global_item_ref+0x67/0xad [ 270.268857] [<ffffffff81cbf3c2>] mgag200_ttm_mem_global_init+0x12/0x14 [ 270.276519] [<ffffffff81b94983>] drm_global_item_ref+0x7e/0xad [ 270.283416] [<ffffffff81cbf489>] mgag200_mm_init+0x50/0x199 [ 270.290020] [<ffffffff81cba964>] mgag200_driver_load+0x34a/0x4c7 [ 270.297109] [<ffffffff81b838ad>] drm_dev_register+0x6f/0xb0 [ 270.303712] [<ffffffff81b860d5>] drm_get_pci_dev+0xff/0x1c2 [ 270.310317] [<ffffffff81cbe709>] mga_pci_probe+0xa6/0xad [ 270.316642] [<ffffffff81911f27>] local_pci_probe+0x3d/0x82 [ 270.323151] [<ffffffff811599c1>] work_for_cpu_fn+0x14/0x1b [ 270.329655] [<ffffffff8115d50b>] process_one_work+0x28e/0x4ef [ 270.336455] [<ffffffff8115d3ed>] ? process_one_work+0x170/0x4ef [ 270.343449] [<ffffffff8115d78d>] process_scheduled_works+0x21/0x2f [ 270.350735] [<ffffffff8115dc06>] worker_thread+0x1fb/0x2bd [ 270.357242] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 270.364821] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 270.372398] [<ffffffff81162dcb>] kthread+0xc5/0xcd [ 270.378125] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 270.384733] [<ffffffff83d556ef>] ret_from_fork+0x3f/0x70 [ 270.391045] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 270.397646] ---[ end trace 0609b8147f0ef5e1 ]--- [ 270.403093] ------------[ cut here ]------------ [ 270.408531] WARNING: CPU: 0 PID: 230 at lib/kobject.c:244 kobject_add_internal+0x281/0x2c4() [ 270.418444] kobject_add_internal failed for memory_accounting (error: -2 parent: kkkkkkk\xffffffa5\xffffffbb\xffffffbb\xffffffbb\xffffffbb\xffffffbb\xffffffbb\xffffffbb\xffffffbb`R\xffffffb0\xffffff88\xffffffff\xffffffffsD\xffffff89\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff>\xffffffe3(\xffffff81\xffffffff\xffffffff\xffffffff\xffffffffJ)\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff\xffffffaf\xfffffff6\xffffff89\xffffff81\xffffffff\xffffffff\xffffffff\xffffffffsD\xffffff89\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff\xffffff9c&܁\xffffffff\xffffffff\xffffffff\xffffffffֱR\xffffff87\xffffffff\xffffffff\xffffffff\xffffffff\xffffff88!) [ 270.435559] Modules linked in: [ 270.439326] CPU: 0 PID: 230 Comm: kworker/0:1 Tainted: G W L 4.3.0-rc3-02057-g77880ef-dirty #183 [ 270.450700] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [ 270.462657] Workqueue: events work_for_cpu_fn [ 270.467875] 0000000000000000 ffff88041fabf9c0 ffffffff81892127 ffff88041fabfa08 [ 270.476941] ffff88041fabf9f8 ffffffff81145b0f ffffffff8189494c ffff88041fe5e270 [ 270.486017] ffffffff86c288b0 00000000fffffffe 0000000000ff0000 ffff88041fabfa58 [ 270.495088] Call Trace: [ 270.498094] [<ffffffff81892127>] dump_stack+0x4b/0x64 [ 270.504118] [<ffffffff81145b0f>] warn_slowpath_common+0x9f/0xb8 [ 270.511113] [<ffffffff8189494c>] ? kobject_add_internal+0x281/0x2c4 [ 270.518496] [<ffffffff81145b74>] warn_slowpath_fmt+0x4c/0x4e [ 270.525197] [<ffffffff8189494c>] kobject_add_internal+0x281/0x2c4 [ 270.532387] [<ffffffff81894a02>] kobject_init_and_add+0x73/0x7e [ 270.539380] [<ffffffff81b9ba3f>] ttm_mem_global_init+0xc6/0x2cd [ 270.546372] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 270.553460] [<ffffffff81291f09>] ? kasan_unpoison_shadow+0x14/0x35 [ 270.560744] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 270.567844] [<ffffffff81291f75>] ? kasan_kmalloc+0x4b/0x50 [ 270.574350] [<ffffffff8128ebc4>] ? __kmalloc+0x13e/0x180 [ 270.580665] [<ffffffff812916f1>] ? kasan_poison_shadow+0x2f/0x31 [ 270.587757] [<ffffffff81b9496c>] ? drm_global_item_ref+0x67/0xad [ 270.594847] [<ffffffff81cbf3c2>] mgag200_ttm_mem_global_init+0x12/0x14 [ 270.602522] [<ffffffff81b94983>] drm_global_item_ref+0x7e/0xad [ 270.609423] [<ffffffff81cbf489>] mgag200_mm_init+0x50/0x199 [ 270.616027] [<ffffffff81cba964>] mgag200_driver_load+0x34a/0x4c7 [ 270.623118] [<ffffffff81b838ad>] drm_dev_register+0x6f/0xb0 [ 270.629722] [<ffffffff81b860d5>] drm_get_pci_dev+0xff/0x1c2 [ 270.636327] [<ffffffff81cbe709>] mga_pci_probe+0xa6/0xad [ 270.642642] [<ffffffff81911f27>] local_pci_probe+0x3d/0x82 [ 270.649154] [<ffffffff811599c1>] work_for_cpu_fn+0x14/0x1b [ 270.655664] [<ffffffff8115d50b>] process_one_work+0x28e/0x4ef [ 270.662465] [<ffffffff8115d3ed>] ? process_one_work+0x170/0x4ef [ 270.669459] [<ffffffff8115d78d>] process_scheduled_works+0x21/0x2f [ 270.676747] [<ffffffff8115dc06>] worker_thread+0x1fb/0x2bd [ 270.683259] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 270.690836] [<ffffffff8115da0b>] ? cancel_delayed_work_sync+0x15/0x15 [ 270.698414] [<ffffffff81162dcb>] kthread+0xc5/0xcd [ 270.704143] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 270.710742] [<ffffffff83d556ef>] ret_from_fork+0x3f/0x70 [ 270.717055] [<ffffffff81162d06>] ? kthread_parkme+0x24/0x24 [ 270.723658] ---[ end trace 0609b8147f0ef5e2 ]--- [ 270.729111] [drm:mgag200_mm_init] *ERROR* Failed setting up TTM memory accounting subsystem. [ 270.739731] PM: Removing info for No Bus:card0 [ 270.746079] PM: Removing info for No Bus:controlD64 [ 270.755395] mgag200: probe of 0000:0b:00.0 failed with error -2 [ 270.763040] initcall mgag200_init+0x0/0x3b returned 0 after 1371312 usecs [ 270.873569] calling cirrus_init+0x0/0x3b @ 1
and fails - but does not crash.
Similar config to what I sent you earlier in this thread.
Thanks,
Ingo
On Mon, Sep 07, 2015 at 05:28:30PM +0530, Sudip Mukherjee wrote:
If drm_fb_helper_alloc_fbi() fails then we were directly returning without freeing sysram. Also if drm_fb_helper_alloc_fbi() succeeds but mgag200_framebuffer_init() fails then we were not releasing sysram and we were not releasing fbi helper also.
Signed-off-by: Sudip Mukherjee sudip@vectorindia.org
Hi Thierry, A gentle ping.
regards sudip
dri-devel@lists.freedesktop.org