Skip to content

Commit

Permalink
Revert "nouveau/bios: Fix tracking of BIOS image data"
Browse files Browse the repository at this point in the history
This reverts commit d06221c.

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 <mroos@linux.ee>
Requested-by: Dave Airlie <airlied@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Apr 4, 2012
1 parent 01627d9 commit f3718a8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/nouveau/nouveau_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit f3718a8

Please sign in to comment.