Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754140AbYHKAom (ORCPT ); Sun, 10 Aug 2008 20:44:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753134AbYHKAoe (ORCPT ); Sun, 10 Aug 2008 20:44:34 -0400 Received: from tundra.namei.org ([65.99.196.166]:50986 "EHLO tundra.namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbYHKAod (ORCPT ); Sun, 10 Aug 2008 20:44:33 -0400 Date: Mon, 11 Aug 2008 10:44:06 +1000 (EST) From: James Morris To: David Howells cc: Grant Wilson , Jasper Bryant-Greene , Thomas Meyer , Linux-Kernel , Linux-Next Subject: Re: next-20080808: bash: fork: Resource temporarily unavailable In-Reply-To: <22475.1218414070@redhat.com> Message-ID: References: <20080810113044.19143b0a@worthy.swandive.local> <1218322518.3268.0.camel@luna.unix.geek.nz> <1218287473.3155.13.camel@dhcppc0> <1218281190.3155.5.camel@dhcppc0> <1218214935.3146.5.camel@dhcppc0> <14476.1218286327@redhat.com> <15386.1218290826@redhat.com> <10251.1218361539@redhat.com> <22475.1218414070@redhat.com> User-Agent: Alpine 1.10 (LRH 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 54 On Mon, 11 Aug 2008, David Howells wrote: > Grant Wilson wrote: > > > [ 223.039938] Rlimit EAGAIN (-1 >= 16375, uid 1000) > > [ 223.044744] copy_process() = -11 > > [ 226.660319] Rlimit EAGAIN (-1 >= 16375, uid 1000) > > [ 226.664166] copy_process() = -11 > > Can you try the attached patch please? This is working for me. I'll push it to next-creds so it (hopefully) gets into the next linux-next for wider testing. > > David > --- > CRED: Inc the user processes count on cred share return from copy_creds() > > From: David Howells > > Increment the user processes count in the case where copy_creds() returns after > sharing the parent's credentials instead of allocating new ones. > > Signed-off-by: David Howells > --- > > kernel/cred.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > > diff --git a/kernel/cred.c b/kernel/cred.c > index f89c5e5..056ec90 100644 > --- a/kernel/cred.c > +++ b/kernel/cred.c > @@ -299,6 +299,7 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags) > #endif > p->real_cred = get_cred(p->cred); > get_cred(p->cred); > + atomic_inc(&p->cred->user->processes); > return 0; > } > > -- James Morris -- 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/