[PATCH 0/4] other ircomm_tty fixes (was Re: [PATCH] ircomm: release tty before sleeping potentially indefintely)

2013-03-05 Thread Peter Hurley
On Sun, 2013-03-03 at 23:24 -0500, Peter Hurley wrote: > On Sun, 2013-03-03 at 21:36 -0500, David Miller wrote: > > From: Peter Hurley > > Date: Sun, 03 Mar 2013 20:06:18 -0500 > > > > > But regardless, this function __cannot__ sleep holding the tty_lock(). > > > > So drop it across the schedule()

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Peter Hurley
On Sun, 2013-03-03 at 21:36 -0500, David Miller wrote: > From: Peter Hurley > Date: Sun, 03 Mar 2013 20:06:18 -0500 > > > But regardless, this function __cannot__ sleep holding the tty_lock(). > > So drop it across the schedule(), but recheck the termios after > regrabbing it. I'll have to do

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Peter Hurley
On Sun, 2013-03-03 at 21:36 -0500, David Miller wrote: > From: Peter Hurley > Date: Sun, 03 Mar 2013 20:06:18 -0500 > > > But regardless, this function __cannot__ sleep holding the tty_lock(). > > So drop it across the schedule(), but recheck the termios after > regrabbing it. I'll have to do s

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread David Miller
From: Peter Hurley Date: Sun, 03 Mar 2013 20:06:18 -0500 > But regardless, this function __cannot__ sleep holding the tty_lock(). So drop it across the schedule(), but recheck the termios after regrabbing it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Peter Hurley
On Sun, 2013-03-03 at 17:47 -0500, David Miller wrote: > From: Sasha Levin > 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, > > c

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Peter Hurley
On Sun, 2013-03-03 at 19:33 -0500, David Miller wrote: > From: Peter Hurley > Date: Sun, 03 Mar 2013 19:04:25 -0500 > > > All these are re-tested in the loop. What state test isn't repeated? > > One that rechecks the non-blocking filp flag, the > TTY_IO_ERROR tty flag and the termios settings. >

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread David Miller
From: Peter Hurley Date: Sun, 03 Mar 2013 19:04:25 -0500 > All these are re-tested in the loop. What state test isn't repeated? One that rechecks the non-blocking filp flag, the TTY_IO_ERROR tty flag and the termios settings. Like I said, all of the state tests performed at the beginning of thi

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread David Miller
From: Sasha Levin Date: Sun, 03 Mar 2013 18:17:38 -0500 > On 03/03/2013 05:47 PM, David Miller wrote: >> From: Sasha Levin >> 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 preven

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Peter Hurley
On Sun, 2013-03-03 at 17:47 -0500, David Miller wrote: > From: Sasha Levin > 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, > > c

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Sasha Levin
On 03/03/2013 05:47 PM, David Miller wrote: > From: Sasha Levin > 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 an

Re: [PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread David Miller
From: Sasha Levin 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 > Signed-o

[PATCH] ircomm: release tty before sleeping potentially indefintely

2013-03-03 Thread Sasha Levin
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 Signed-off-by: Sasha Levin --- net/irda/ircomm/ircomm_tty.c | 2 ++ 1 file c