From f3718a818f7fb3636130d5f34bde8df34f45c5e5 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 4 Apr 2012 08:16:25 -0700 Subject: [PATCH] Revert "nouveau/bios: Fix tracking of BIOS image data" This reverts commit d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1. It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(), apparently because the code ends up trying to free somethng that was never kmalloced in the first place. BenH points out that the patch was untested and wasn't meant to go into the upstream kernel that quickly in the first place. Backtrace: bios_shadow bios_shadow_prom nv_mask init_io bios_shadow nouveau_bios_init NVReadVgaCrtc NVSetOwner nouveau_card_init nouveau_load Reported-by: Meelis Roos Requested-by: Dave Airlie Acked-by: Benjamin Herrenschmidt Cc: Ben Skeggs Signed-off-by: Linus Torvalds --- drivers/gpu/drm/nouveau/nouveau_bios.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 1947d61..80963d0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -273,7 +273,6 @@ bios_shadow(struct drm_device *dev) mthd->score = score_vbios(bios, mthd->rw); mthd->size = bios->length; mthd->data = bios->data; - bios->data = NULL; } while (mthd->score != 3 && (++mthd)->shadow); mthd = shadow_methods; @@ -282,8 +281,7 @@ bios_shadow(struct drm_device *dev) if (mthd->score > best->score) { kfree(best->data); best = mthd; - } else - kfree(mthd->data); + } } while ((++mthd)->shadow); if (best->score) { -- 2.7.4