Already sent to Thomas,
--- sis_main.c~ Thu Jul 4 17:58:26 2002
+++ sis_main.c Sat Jul 27 17:40:48 2002
@@ -651,6 +651,7 @@
struct fb_fix_screeninfo fix;
struct display *display;
struct display_switch *sw;
+ static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
long flags;
if (con >= 0)
@@ -674,7 +675,7 @@
display->inverse = sisfb_inverse;
display->var = *var;
- save_flags(flags);
+ spin_lock_irqsave(&driver_lock, flags);
switch (ivideo.video_bpp) {
#ifdef FBCON_HAS_CFB8
case 8:
@@ -706,7 +707,7 @@
}
memcpy(&sisfb_sw, sw, sizeof(*sw));
display->dispsw = &sisfb_sw;
- restore_flags(flags);
+ spin_unlock_irqrestore(&driver_lock, flags);
display->scrollmode = SCROLL_YREDRAW;
sisfb_sw.bmove = fbcon_redraw_bmove;
--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
On Sat, Jul 27, 2002 at 06:03:25PM +0200, bert hubert wrote:
> Already sent to Thomas,
This actually needs to be a lock against concurrent modification of
fb_display[] as it appears other things get at the data under the lock
without taking the lock you introduced.
Cheers,
Bill