Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2011-10-12 11:42:57 +0200
committerEgbert Eich <eich@suse.de>2011-10-12 11:42:57 +0200
commit98cdb5f11faf292435ba2b28a427b0d84e72f4cb (patch)
tree7d2b44cc220afc2cfcab74c74f308b402862cf06
parent31d7e86daaa1a6a0ab6dc8620b2ed9c5eff40642 (diff)
SUSE-bootsplash: Don't crash when splash is turned off.
Fix crash when splash is off (ie. (struct fb_info *)->splash_data == NULL) but someone tries to manipulate the splash image thru the /proc interface. All other functions in render.c seem to be save - ie. upper level code already protects them from being called if the splash_data member is NULL (bnc #718666). suse-commit: 2fc2aaf9b6e1d7e7c8eb49347885317da97ca7ce
-rw-r--r--drivers/video/bootsplash/bootsplash.c2
-rw-r--r--include/linux/bootsplash.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/bootsplash/bootsplash.c b/drivers/video/bootsplash/bootsplash.c
index b6f8aae5d1e9..2e82d4fc9dca 100644
--- a/drivers/video/bootsplash/bootsplash.c
+++ b/drivers/video/bootsplash/bootsplash.c
@@ -1227,7 +1227,7 @@ static int splash_recolor(struct vc_data *vc, struct fb_info *info)
vc->vc_splash_data->imgd->splash_fg_color;
if (vc->vc_def_color != color)
con_remap_def_color(vc, color);
- if (info && fg_console == vc->vc_num)
+ if (info && info->splash_data && fg_console == vc->vc_num)
splash_update_redraw(vc, info);
vc->vc_splash_data->color_set = 1;
return 0;
diff --git a/include/linux/bootsplash.h b/include/linux/bootsplash.h
index 3c99eb38f551..a83c1cf1e826 100644
--- a/include/linux/bootsplash.h
+++ b/include/linux/bootsplash.h
@@ -76,7 +76,6 @@ extern void con_remap_def_color(struct vc_data *vc, int new_color);
# define splash_clear(vc, info, sy, sx, height, width)
# define splash_clear_margins(vc, info, bottom_only)
# define splash_putcs(vc, info, s, count, ypos, xpos)
-# define splash_clear_margins(vc, info, bottom_only)
# define SPLASH_DATA(x) 0
# define TEXT_WIDTH_FROM_SPLASH_DATA(x) 0