Commit 1086892d authored by Richard Henderson's avatar Richard Henderson Committed by Linus Torvalds

[PATCH] fix alpha boot oops

Oops in fb_set_cmap caused by palette_cmap.transp uninitialized.

By inspection, fb_blank appears to have the same problem.
parent 5a09946d
...@@ -386,6 +386,7 @@ static void __init fb_set_logocmap(struct fb_info *info) ...@@ -386,6 +386,7 @@ static void __init fb_set_logocmap(struct fb_info *info)
palette_cmap.red = palette_red; palette_cmap.red = palette_red;
palette_cmap.green = palette_green; palette_cmap.green = palette_green;
palette_cmap.blue = palette_blue; palette_cmap.blue = palette_blue;
palette_cmap.transp = NULL;
for (i = 0; i < LINUX_LOGO_COLORS; i += n) { for (i = 0; i < LINUX_LOGO_COLORS; i += n) {
n = LINUX_LOGO_COLORS - i; n = LINUX_LOGO_COLORS - i;
...@@ -767,6 +768,7 @@ fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -767,6 +768,7 @@ fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info)
int int
fb_blank(int blank, struct fb_info *info) fb_blank(int blank, struct fb_info *info)
{ {
/* ??? Varible sized stack allocation. */
u16 black[info->cmap.len]; u16 black[info->cmap.len];
struct fb_cmap cmap; struct fb_cmap cmap;
...@@ -775,8 +777,7 @@ fb_blank(int blank, struct fb_info *info) ...@@ -775,8 +777,7 @@ fb_blank(int blank, struct fb_info *info)
if (blank) { if (blank) {
memset(black, 0, info->cmap.len * sizeof(u16)); memset(black, 0, info->cmap.len * sizeof(u16));
cmap.red = cmap.green = cmap.blue = black; cmap.red = cmap.green = cmap.blue = black;
if (info->cmap.transp) cmap.transp = info->cmap.transp ? black : NULL;
cmap.transp = black;
cmap.start = info->cmap.start; cmap.start = info->cmap.start;
cmap.len = info->cmap.len; cmap.len = info->cmap.len;
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment