lkml.org 
[lkml]   [2012]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/14] tty/serial/core: Introduce poll_init callback

> + tport = &state->port;
> + if (!(tport->flags & ASYNC_INITIALIZED) && port->ops->poll_init) {
> + mutex_lock(&tport->mutex);
> + ret = port->ops->poll_init(port);
> + /*
> + * We don't set ASYNCB_INITIALIZED as we only initialized the
> + * hw, e.g. state->xmit is still uninitialized.
> + */
> + mutex_unlock(&tport->mutex);
> + if (ret)
> + return ret;
> + }

What stops a parallel open or close changing ASYNC_INITIALIZED after you
test and before you lock ?

Alan


\
 
 \ /
  Last update: 2012-09-10 13:41    [W:0.142 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site