[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: dlm: config: Fix ENOMEM failures in make_cluster()
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2016-03-30 18:31:30
Message-ID: 20160330183130.6ED4866085E () gitolite ! kernel ! org
[Download RAW message or body]
Web: https://git.kernel.org/torvalds/c/82c7d823cc31cf56d964eebe1f91aaf1691cddce
Commit: 82c7d823cc31cf56d964eebe1f91aaf1691cddce
Parent: f55532a0c0b8bb6148f4e07853b876ef73bc69ca
Refname: refs/heads/master
Author: Andrew Price <anprice@redhat.com>
AuthorDate: Tue Mar 22 17:36:34 2016 +0000
Committer: David Teigland <teigland@redhat.com>
CommitDate: Tue Mar 29 10:28:08 2016 -0500
dlm: config: Fix ENOMEM failures in make_cluster()
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.
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
---
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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic