Re: [PATCH] tty: Only hangup once

2013-11-19 Thread Greg KH
On Tue, Nov 19, 2013 at 04:34:19PM -0500, Peter Hurley wrote: > On 11/19/2013 12:40 PM, Greg KH wrote: > > It should be backported to 3.12, and any other kernels? > > Greg, > > This patch should apply cleanly to 3.12. > > The first commit to rely on the correct TTY_HUPPED state was > commit 3669

Re: [PATCH] tty: Only hangup once

2013-11-19 Thread Peter Hurley
On 11/19/2013 12:40 PM, Greg KH wrote: It should be backported to 3.12, and any other kernels? Greg, This patch should apply cleanly to 3.12. The first commit to rely on the correct TTY_HUPPED state was commit 36697529b5bbe36911e39a6309e7a7c9250d280a, 'tty: Replace ldisc locking with ldisc

Re: [PATCH] tty: Only hangup once

2013-11-19 Thread Greg KH
On Tue, Nov 19, 2013 at 08:19:52PM +0300, Heorhi Valakhanovich wrote: > On Tue, 19 Nov 2013 08:46:27 -0500 > Peter Hurley wrote: > > > Would you please test the patch below and confirm the fix? > > > > --->%--- > > Subject: [PATCH] tty: Reset hupped state on open > > > > A common security idiom

Re: [PATCH] tty: Only hangup once

2013-11-19 Thread Heorhi Valakhanovich
On Tue, 19 Nov 2013 08:46:27 -0500 Peter Hurley wrote: > Would you please test the patch below and confirm the fix? > > --->%--- > Subject: [PATCH] tty: Reset hupped state on open > > A common security idiom is to hangup the current tty (via vhangup()) > after forking but before execing a root

Re: [PATCH] tty: Only hangup once

2013-11-19 Thread Peter Hurley
On 11/18/2013 04:09 PM, Heorhi Valakhanovich wrote: On Mon, 18 Nov 2013 15:32:59 -0500 Peter Hurley wrote: On 11/18/2013 12:37 PM, Peter Hurley wrote: On 11/18/2013 08:42 AM, One Thousand Gnomes wrote: After upgrading to kernel 3.12 I noticed one issue with tmux software. The easiest way to

Re: [PATCH] tty: Only hangup once

2013-11-18 Thread One Thousand Gnomes
> I doubt this is caused by a race condition; the first hangup would do most > of the destruction regardless, and a second hangup can't really race with > the first because of the tty_lock() held for most of the hangup. > > In any event, it's worth discovering what state a subsequent hangup can >

Re: [PATCH] tty: Only hangup once

2013-11-18 Thread Heorhi Valakhanovich
On Mon, 18 Nov 2013 15:32:59 -0500 Peter Hurley wrote: > On 11/18/2013 12:37 PM, Peter Hurley wrote: > > On 11/18/2013 08:42 AM, One Thousand Gnomes wrote: > >>> After upgrading to kernel 3.12 I noticed one issue with tmux > >>> software. The easiest way to reproduce will be: > >>> 1. Start tmux

Re: [PATCH] tty: Only hangup once

2013-11-18 Thread Peter Hurley
On 11/18/2013 12:37 PM, Peter Hurley wrote: On 11/18/2013 08:42 AM, One Thousand Gnomes wrote: After upgrading to kernel 3.12 I noticed one issue with tmux software. The easiest way to reproduce will be: 1. Start tmux session as root. 2. Connect via ssh and use "tmux attach" to attach to the run

Re: [PATCH] tty: Only hangup once

2013-11-18 Thread Peter Hurley
On 11/18/2013 08:42 AM, One Thousand Gnomes wrote: After upgrading to kernel 3.12 I noticed one issue with tmux software. The easiest way to reproduce will be: 1. Start tmux session as root. 2. Connect via ssh and use "tmux attach" to attach to the running session. 3. Kill ssh client. Heorhi,

Re: [PATCH] tty: Only hangup once

2013-11-18 Thread One Thousand Gnomes
> After upgrading to kernel 3.12 I noticed one issue with tmux software. > The easiest way to reproduce will be: > 1. Start tmux session as root. > 2. Connect via ssh and use "tmux attach" to attach to the running > session. > 3. Kill ssh client. > > You can notice that shell (zsh in my case) and

Re: [PATCH] tty: Only hangup once

2013-11-17 Thread Heorhi Valakhanovich
On Wed, 31 Jul 2013 14:05:45 -0400 Peter Hurley wrote: > Instrumented testing shows a tty can be hungup multiple times [1]. > Although concurrent hangups are properly serialized, multiple > hangups for the same tty should be prevented. > > If tty has already been HUPPED, abort hangup. Note it is

Re: [PATCH] tty: Only hangup once

2013-08-02 Thread Peter Hurley
On 08/01/2013 11:46 PM, Greg Kroah-Hartman wrote: A diff inside the changelog entry of a diff is going to cause havoc :) Right, sorry :) Won't happen again. I'll go edit this to make it not complain... Thanks, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH] tty: Only hangup once

2013-08-01 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2013 at 02:05:45PM -0400, Peter Hurley wrote: > Instrumented testing shows a tty can be hungup multiple times [1]. > Although concurrent hangups are properly serialized, multiple > hangups for the same tty should be prevented. > > If tty has already been HUPPED, abort hangup. Note

[PATCH] tty: Only hangup once

2013-07-31 Thread Peter Hurley
Instrumented testing shows a tty can be hungup multiple times [1]. Although concurrent hangups are properly serialized, multiple hangups for the same tty should be prevented. If tty has already been HUPPED, abort hangup. Note it is not necessary to cleanup file *redirect on subsequent hangups, as