Oliver Neukum <oneukum@xxxxxxxx> writes: > + wait_event(desc->wait, > + /* > + * needs both flags. We cannot do with one > + * because resetting it would cause a race > + * with write() yet we need to signal > + * a disconnect > + */ > + !test_bit(WDM_IN_USE, &desc->flags) && > + test_bit(WDM_DISCONNECTING, &desc->flags)); I'm confused now... Won't this condition always be false? Should be wait_event(desc->wait, !test_bit(WDM_IN_USE, &desc->flags) || test_bit(WDM_DISCONNECTING, &desc->flags)); instead, or? Bjørn