mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* sisfb driver irq fixups
@ 2002-07-27 16:03 bert hubert
  2002-07-27 16:18 ` William Lee Irwin III
  0 siblings, 1 reply; 2+ messages in thread
From: bert hubert @ 2002-07-27 16:03 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sisfb driver irq fixups
  2002-07-27 16:03 sisfb driver irq fixups bert hubert
@ 2002-07-27 16:18 ` William Lee Irwin III
  0 siblings, 0 replies; 2+ messages in thread
From: William Lee Irwin III @ 2002-07-27 16:18 UTC (permalink / raw)
  To: bert hubert, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-27 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-27 16:03 sisfb driver irq fixups bert hubert
2002-07-27 16:18 ` William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®