From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbXCNRIr (ORCPT ); Wed, 14 Mar 2007 13:08:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752252AbXCNRIr (ORCPT ); Wed, 14 Mar 2007 13:08:47 -0400 Received: from wr-out-0506.google.com ([64.233.184.231]:21349 "EHLO wr-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbXCNRIp (ORCPT ); Wed, 14 Mar 2007 13:08:45 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ngXX7WNXoNJb80+rs9rG/hlB3h70SKX2hg75JJT/upmhh5xduiFXZX7tO2AUYtB/oLCtW0cSu16X1ByRgNFK3W6Q8Vg3CJJoYnAnxEIKucyOQi2KtO7MmOmlHvBcl1mWnaR1W/tmJwzvv2TNTJIlwDYvlv2JglXvRlPwwVpFyVk= Message-ID: Date: Wed, 14 Mar 2007 17:08:34 +0000 From: "Catalin Marinas" To: "Eric W. Biederman" Subject: Re: Possible "struct pid" leak from tty_io.c Cc: "Linux Kernel Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 14/03/07, Eric W. Biederman wrote: > How does this look? It seems to fix the leak. I looked at the logs and proc_set_tty calls put_pid twice for pid 245 (the unresolved leak) and get_pid for pid 296, which is later passed to put_pid via do_tty_hangup. I still get the "error attempted to write to tty [0x00000000] = NULL" when debugging is enabled in tty_io.c but it seems harmless. > I don't have the setup to test this easily, but this bit makes seems to > make sense. And I don't have a fully tested kmemleak patch to post either :-). Thanks. -- Catalin