Re: [PATCH] ircomm: release tty before sleeping potentiallyindefintely

From: David Miller
Date: Sun Mar 03 2013 - 17:48:02 EST


From: Sasha Levin <sasha.levin@xxxxxxxxxx>
Date: Sun, 3 Mar 2013 17:35:53 -0500

> ircomm_tty_block_til_ready would hold tty lock while blocking. Since the sleep
> might take a long time we can prevent other processes from accessing the tty,
> causing hung tasks and a dead tty.
>
> Diagnosed-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>

But then you invalidate all of the tty state tests made under
the lock at the beginning of this function, before enterring
the loop. If you drop the lock, those pieces of state could
change.

I'm not applying this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/