> You've missed this hunk: > > if (filp->f_flags & O_NONBLOCK) { > if (down_trylock(&port->sm_sem)) { > ret = -EAGAIN; > goto fail; > } > } else { > if (down_interruptible(&port->sm_sem)) { > ret = -ERESTARTSYS; > goto fail; > } > }Duh, thanks.