Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753268AbXE3Kok (ORCPT ); Wed, 30 May 2007 06:44:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751483AbXE3Kod (ORCPT ); Wed, 30 May 2007 06:44:33 -0400 Received: from mailhub.sw.ru ([195.214.233.200]:44120 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbXE3Kod (ORCPT ); Wed, 30 May 2007 06:44:33 -0400 Message-ID: <465D5677.2080307@openvz.org> Date: Wed, 30 May 2007 14:48:23 +0400 From: Pavel Emelianov User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: menage@google.com CC: akpm@linux-foundation.org, dev@sw.ru, serue@us.ibm.com, vatsa@in.ibm.com, ebiederm@xmission.com, haveblue@us.ibm.com, svaidy@linux.vnet.ibm.com, balbir@in.ibm.com, pj@sgi.com, cpw@sgi.com, ckrm-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org, containers@lists.osdl.org, mbligh@google.com, rohitseth@google.com, devel@openvz.org Subject: Re: [PATCH 00/10] Containers(V10): Generic Process Containers References: <20070529130104.461765000@menage.corp.google.com> In-Reply-To: <20070529130104.461765000@menage.corp.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1404 Lines: 46 Hi Paul. I have faced a warning during testing your patches. The testcase is simple: # ssh to the node mount -t container none /cnt/rss/ -o rss mkdir /cnt/rss/0 /bin/echo $$ > /cnt/rss/0/tasks # exit with ^d and ssh again rmdir /cnt/rss/0 dmesg BUG: at mm/slab.c:777 __find_general_cachep() [] __kmalloc+0x3f/0xa5 [] container_tasks_open+0x56/0x11f [] container_file_open+0x0/0x36 [] container_file_open+0x2f/0x36 [] __dentry_open+0xc1/0x178 [] nameidata_to_filp+0x24/0x33 [] do_filp_open+0x32/0x39 [] get_unused_fd+0x50/0xb6 [] do_sys_open+0x42/0xbe [] sys_open+0x1c/0x1e [] sysenter_past_esp+0x5f/0x85 [] __xfrm_policy_check+0x11a/0x4f6 The bug seems to be here: static int container_tasks_open(struct inode *unused, struct file *file) { ... npids = container_task_count(cont); pidarray = kmalloc(npids * sizeof(pid_t), GFP_KERNEL); if (!pidarray) goto err1; ... } The npids happened to be 0 and kmalloc warns that size is zero. Thanks, Pavel. - 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/