linux/drivers/video/i810
Samuel CUELLA 16b71fdf97 i810: fix kernel crash fix when struct fb_var_screeninfo is supplied
Prevent the kernel from being crashed by a divide-by-zero operation when
supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

Previously i810_main.c:1005 (i810_check_params) was using the global
'yres' symbol previously defined at i810_main.c:145 as a module parameter
value holder (i810_main.c:2174).  If i810fb is compiled-in or if this
param doesn't get a default value, this direct usage leads to a
divide-by-zero at i810_main.c:1005 (i810_check_params).  The patch simply
replace the 'yres' global, perhaps undefined symbol usage by a given
parameter structure lookup.

This problem occurs with directfb, mplayer -vo fbdev, SDL library.
It was also reported ( but non solved ) at:

	http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.html

Signed-off-by: Samuel CUELLA <samuel.cuella@supinfo.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:12 -07:00
..
i810_accel.c i810: fix sparse warnings 2009-01-06 15:59:27 -08:00
i810_dvt.c
i810_gtf.c [PATCH] drivers/video/: possible cleanups 2006-01-10 08:01:56 -08:00
i810_main.c i810: fix kernel crash fix when struct fb_var_screeninfo is supplied 2009-03-10 15:55:12 -07:00
i810_main.h [PATCH] drivers/video/: possible cleanups 2006-01-10 08:01:56 -08:00
i810_regs.h [PATCH] i810fb: Cleanup I2C code 2005-11-07 07:53:52 -08:00
i810-i2c.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i810.h i810fb: the pseudo_palette is only 16 elements long 2007-07-17 10:23:12 -07:00
Makefile