Messages in this thread | | | Date | Fri, 31 Dec 2004 10:45:30 +0100 | From | Jan Dittmer <> | Subject | Re: [PATCH] esp: Make driver SMP-correct |
| |
James Nelson wrote: > static inline int serial_paranoia_check(struct esp_struct *info, > char *name, const char *routine) > { > @@ -209,34 +197,38 @@ > struct esp_struct *info = (struct esp_struct *)tty->driver_data; > unsigned long flags; > > - if (serial_paranoia_check(info, tty->name, "rs_stop")) > - return; > + spin_lock_irqsave(&info->irq_lock, flags); > + > + if (unlikely(serial_paranoia_check(info, tty->name, __FUNCTION__))) > + goto out;
> static void rs_start(struct tty_struct *tty) > { > struct esp_struct *info = (struct esp_struct *)tty->driver_data; > unsigned long flags; > - > - if (serial_paranoia_check(info, tty->name, "rs_start")) > - return; > - > - save_flags(flags); cli(); > + > + spin_lock_irqsave(&info->irq_lock, flags); > + > + if (unlikely(serial_paranoia_check(info, tty->name, __FUNCTION__))) > + goto out; > +
This will deadlock. serial_paranoia_check also unconditionally tries to take the lock.
Jan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |