efifb: check that the base address is plausible on pci systems
commit2d325d38fbced76120c9df96d535961ef2c65170
authorPeter Jones <pjones@redhat.com>
Wed, 22 Sep 2010 20:05:04 +0000 (22 13:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:26:53 +0000 (9 13:26 -0800)
tree3e8e0a44db98c5934a48135717a55bb2b3e98ca5
parentdc06f166e1ac4d82f8eb10645fcbfb9cc609583d
efifb: check that the base address is plausible on pci systems

commit 85a00d9bbfb4704fbf368944b1cb9fed8f1598c5 upstream.

Some Apple machines have identical DMI data but different memory
configurations for the video.  Given that, check that the address in our
table is actually within the range of a PCI BAR on a VGA device in the
machine.

This also fixes up the return value from set_system(), which has always
been wrong, but never resulted in bad behavior since there's only ever
been one matching entry in the dmi table.

The patch

1) stops people's machines from crashing when we get their display wrong,
   which seems to be unfortunately inevitable,

2) allows us to support identical dmi data with differing video memory
   configurations

This also adds me as the efifb maintainer, since I've effectively been
acting as such for quite some time.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
MAINTAINERS
drivers/video/efifb.c