On Tue, Jul 24, 2007 at 03:52:49PM +0100, David Woodhouse wrote: > > Elsewhere in the patch. Got, thanks. > Read Documentation/memory-barriers.txt > > There is a tiny but possibly non-zero chance that one CPU could be in > pps_event() and might not yet have 'seen' the change to the .info field. > Releasing the pps_mutex provides a write-barrier on the CPU which runs > pps_unregister_source(), but there's no corresponding read-barrier on > the CPU running pps_event(). You have to be careful about when > pps_event() is run. It _MUST_ not touch the old info structure after > pps_unregister_source() has completed. > > At the moment, I think it's OK because you won't be calling pps_event() > at the wrong times. But you do need to make sure that requirement is > documented. And I think you can remove the whole dummy_info thing > because it's not necessary. What about this new solution involving tasklets? The pps_event() now just records data and then a tasklet do the data management job. :) Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@gnudd.com Embedded Systems giometti@linux.it UNIX programming phone: +39 349 2432127