lkml.org 
[lkml]   [2010]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-11-21 15:17    [W:0.123 / U:11.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site