diff mbox

[Bug,31708] kernel oops when loading large images with firefox

Message ID 20101118130737.D524313004E@annarchy.freedesktop.org (mailing list archive)
State New, archived
Headers show

Commit Message

bugzilla-daemon@freedesktop.org Nov. 18, 2010, 1:07 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 3ca77dc..e67831c 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1119,8 +1119,13 @@  EXPORT_SYMBOL(ttm_bo_validate);
 int ttm_bo_check_placement(struct ttm_buffer_object *bo,
                                struct ttm_placement *placement)
 {
-       BUG_ON((placement->fpfn || placement->lpfn) &&
-              (bo->mem.num_pages > (placement->lpfn - placement->fpfn)));
+        if (((placement->fpfn || placement->lpfn) &&
+              (bo->mem.num_pages > (placement->lpfn - placement->fpfn)))) {
+              printk(KERN_ALERT "bo->mem.num_pages = %d, placement->lpfn =%d,
placement->fpfn = %d\n",
+                              bo->mem.num_pages, placement->lpfn,
placement->fpfn);
+               WARN_ON(1);
+               return -ENOMEM;
+        }