[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101121141226.1576758b@lxorguk.ukuu.org.uk>
Date: Sun, 21 Nov 2010 14:12:26 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Rodolfo Giometti <giometti@...eenne.com>
Cc: Alexander Gordeev <lasaine@....cs.msu.su>,
linux-kernel@...r.kernel.org,
"Nikita V. Youshchenko" <yoush@...msu.su>,
linuxpps@...enneenne.com, Greg Kroah-Hartman <gregkh@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>
Subject: Re: [PATCHv4 05/17] pps: access pps device by direct pointer
> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists