From: Petr V. <van...@vc...> - 2000-05-31 17:01:44
|
Hi Alan as nobody answered to my mail from Monday, please apply this patch to 2.4.0-test1. It fixes one codepath which was proven that there is missing lock. Patch was generated against 2.4.0-test1-ac7. I tried to verify all other callers of set_cursor and I believe that others are safe - or at least immediate callers of set_cursor are at least sometime called with console_lock held. But there are some callers (set_selection, complete_change_console) for which I was not able to verify whether they are called with lock held or not. I'm using this change since monday on my SMP system and I do not see any bad effect - only one good that fbdev is no more reentered. Thanks, Petr Vandrovec van...@vc... diff -urdN linux/drivers/char/console.c linux/drivers/char/console.c --- linux/drivers/char/console.c Sun Apr 2 22:20:27 2000 +++ linux/drivers/char/console.c Wed May 31 15:52:52 2000 @@ -2290,10 +2290,13 @@ static void con_flush_chars(struct tty_struct *tty) { + unsigned long flags; struct vt_struct *vt = (struct vt_struct *)tty->driver_data; pm_access(pm_con); + spin_lock_irqsave(&console_lock, flags); set_cursor(vt->vc_num); + spin_unlock_irqrestore(&console_lock, flags); } /* |