Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 19 Sep 2002 11:06:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 19 Sep 2002 11:06:43 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:34066 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Thu, 19 Sep 2002 11:06:42 -0400 Date: Thu, 19 Sep 2002 08:12:31 -0700 (PDT) From: Linus Torvalds To: William Lee Irwin III cc: Ingo Molnar , Subject: Re: [patch] generic-pidhash-2.5.36-D4, BK-curr In-Reply-To: <20020919105940.GJ28202@holomorphy.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1316 Lines: 29 On Thu, 19 Sep 2002, William Lee Irwin III wrote: > > I did this intentionally. Basically, sys_setsid() does the right thing, > but tty_ioctl() does not. There is already some inconsistency > about how task->tty is locked, and I'd not yet come to a conclusion. I agree about the locking issue (although I do _not_ believe that the tasklock should have anything to do with the tsk->tty locking - it should most likely use some per-task lock for the actual tty accesses, together with the optimization that a write lock on the tasklock is sufficient to protect it because it means that nobody else can look up the task). However, what I worry about is that there may not (will not) be a 1:1 session<->tty thing. In particular, when somebody creates a new session with "setsid()", that does not remove the tty from processes that used to hold it, I think (this is all from memory, so I might be wrong). Which means that if the tty is going away, it has to be removed from _all_ tasks, not just from the one session that happened to be the most recent one. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/