On Wed, 24 Feb 2010 03:40:22 am Amit Shah wrote:
> Hey Rusty, Christian,
> 
> Christoph Hellwig asked why we don't need a barrier before this code in
> virtcons_probe():
> 
> > +     /* Start using the new console output. */
> > +     early_put_chars = NULL;
> >       return 0;
> 
> Since only s390 uses early_put_chars so far, you'd know why it's not
> needed / why we're safe.

He's right, it's sloppy.

In practice the compiler checks for NULL and reuses the pointer, and we
have no problem if this is used a couple of times after the real console is
live.

The Right Way to do this is a lock in put_chars() and around this assignment.
But do we really want to bother?

Cheers,
Rusty.
-- 
Away travelling 25Feb-26Mar (6 .de + 1 .pl + 17 .lt + 2 .sg)
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Reply via email to