Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757408AbcC2PSN (ORCPT ); Tue, 29 Mar 2016 11:18:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46938 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757189AbcC2PSL (ORCPT ); Tue, 29 Mar 2016 11:18:11 -0400 Subject: Re: [Cluster-devel] [PATCH] dlm: config: Fix ENOMEM failures in make_cluster() To: ccaulfie@redhat.com, teigland@redhat.com References: <1458668194-23627-1-git-send-email-anprice@redhat.com> Cc: cluster-devel@redhat.com, linux-kernel@vger.kernel.org, hch@lst.de From: Andrew Price Message-ID: <56FA9CAD.3040107@redhat.com> Date: Tue, 29 Mar 2016 16:18:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1458668194-23627-1-git-send-email-anprice@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1542 Lines: 46 On 22/03/16 17:36, Andrew Price wrote: > Commit 1ae1602de0 "configfs: switch ->default groups to a linked list" > left the NULL gps pointer behind after removing the kcalloc() call which > made it non-NULL. It also left the !gps check in place so make_cluster() > now fails with ENOMEM. Remove the remaining uses of the gps variable to > fix that. Could this go through the linux-dlm tree as a fix for -rc2? The impact is that dlm_controld fails: dlm_controld[890]: 171 dlm_controld 4.0.4 started dlm_controld[890]: 171 /sys/kernel/config/dlm/cluster: mkdir failed: 12 so it's pretty important. Cheers, Andy > > Reviewed-by: Bob Peterson > Reviewed-by: Andreas Gruenbacher > Signed-off-by: Andrew Price > --- > fs/dlm/config.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/dlm/config.c b/fs/dlm/config.c > index 5191121..1669f62 100644 > --- a/fs/dlm/config.c > +++ b/fs/dlm/config.c > @@ -343,13 +343,12 @@ static struct config_group *make_cluster(struct config_group *g, > struct dlm_cluster *cl = NULL; > struct dlm_spaces *sps = NULL; > struct dlm_comms *cms = NULL; > - void *gps = NULL; > > cl = kzalloc(sizeof(struct dlm_cluster), GFP_NOFS); > sps = kzalloc(sizeof(struct dlm_spaces), GFP_NOFS); > cms = kzalloc(sizeof(struct dlm_comms), GFP_NOFS); > > - if (!cl || !gps || !sps || !cms) > + if (!cl || !sps || !cms) > goto fail; > > config_group_init_type_name(&cl->group, name, &cluster_type); >