Re: [PATCHv4 05/17] pps: access pps device by direct pointer
From: Alan Cox
Date: Sun Nov 21 2010 - 09:14:14 EST
> Maybe this lock is useless... however, are we sure that before setting
> tty->disc_data to pps its value is null? Otherwise the dcd_change may
> be called with an oops! We cannot control serial port IRQ
> generation... :-/
tty->disc_data is LDISC private. It may be any arbitary value on entry to
the ldisc open method.
> > + spin_lock_irq(&pps_ldisc_lock);
> > + tty->disc_data = NULL;
> > + spin_unlock_irq(&pps_ldisc_lock);
And you don't need to set it to NULL after - some ldiscs do this mostly
as a debug aid.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/