Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Ren <zren@suse.com>2016-05-11 14:08:38 +0800
committerEric Ren <zren@suse.com>2016-05-11 15:10:10 +0800
commit225be708c0b1c19cb2bc956cfa872e718ea91971 (patch)
tree515310a3464383ca8b324564e131fa7c182bf967
parent267c1ef9079753273e11d1ae31530392bc04f728 (diff)
dlm: config: Fix ENOMEM failures in make_cluster() (bsc#979108).
-rw-r--r--patches.fixes/0001-dlm-config-Fix-ENOMEM-failures-in-make_cluster.patch45
-rw-r--r--series.conf9
2 files changed, 50 insertions, 4 deletions
diff --git a/patches.fixes/0001-dlm-config-Fix-ENOMEM-failures-in-make_cluster.patch b/patches.fixes/0001-dlm-config-Fix-ENOMEM-failures-in-make_cluster.patch
new file mode 100644
index 0000000000..62b1ce44ac
--- /dev/null
+++ b/patches.fixes/0001-dlm-config-Fix-ENOMEM-failures-in-make_cluster.patch
@@ -0,0 +1,45 @@
+From dd724cb62e9f93fc85f11cf1e15d7b8433f08a6c Mon Sep 17 00:00:00 2001
+From: Eric Ren <zren@suse.com>
+Date: Wed, 11 May 2016 13:24:06 +0800
+Subject: [PATCH] dlm: config: Fix ENOMEM failures in make_cluster()
+Git-commit: 82c7d823cc31cf56d964eebe1f91aaf1691cddce
+Patch-mainline: v4.6-rc2
+References: bsc#979108
+
+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>
+Signed-off-by: Eric Ren <zren@suse.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 51911216..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);
+--
+2.6.6
+
diff --git a/series.conf b/series.conf
index 6501ea6e53..ab0b875a62 100644
--- a/series.conf
+++ b/series.conf
@@ -1251,10 +1251,6 @@
patches.fixes/reiserfs-unlock-superblock-before-calling-reiserfs_quota_on_mount.patch
########################################################
- # dlm
- ########################################################
-
- ########################################################
# ocfs2
########################################################
patches.fixes/ocfs2-extend-transaction-for-ocfs2_remove_rightmost_.patch
@@ -3303,6 +3299,11 @@
patches.drivers/0044-target-add-a-new-add_wwn_groups-fabrics-method
########################################################
+ # dlm
+ ########################################################
+ patches.fixes/0001-dlm-config-Fix-ENOMEM-failures-in-make_cluster.patch
+
+ ########################################################
# PCI and PCI hotplug
########################################################
patches.fixes/pci-Update-VPD-definitions.patch