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
..
2008-10-16 11:21:45 -07:00
2008-03-10 18:01:20 -07:00
2008-07-24 10:47:37 -07:00
2009-01-06 15:59:26 -08:00
2009-01-08 16:29:41 +00:00
2009-01-12 20:56:32 +01:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2009-02-22 09:23:02 -08:00
2007-05-04 17:59:05 -07:00
2007-10-18 14:37:17 -07:00
2009-01-12 20:56:32 +01:00
2008-07-24 10:47:34 -07:00
2008-11-19 18:49:59 -08:00
2008-02-03 17:31:49 +02:00
2008-05-18 13:28:49 -07:00
2007-05-08 11:15:26 -07:00
2008-02-06 10:41:16 -08:00
2008-12-16 15:43:50 +01:00
2009-01-21 10:32:34 -07:00
2008-04-28 08:58:41 -07:00
2009-01-06 15:59:27 -08:00
2009-01-06 15:59:27 -08:00
2007-10-16 09:43:20 -07:00
2008-11-27 12:37:59 +00:00
2008-07-26 12:00:12 -07:00
2007-10-16 09:43:22 -07:00
2008-10-16 11:21:42 -07:00
2007-05-08 11:15:32 -07:00
2008-07-04 10:40:08 -07:00