* [PATCH] dlm: config: Fix ENOMEM failures in make_cluster()
@ 2016-03-22 17:36 Andrew Price
2016-03-22 18:24 ` Christoph Hellwig
2016-03-29 15:18 ` [Cluster-devel] " Andrew Price
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Price @ 2016-03-22 17:36 UTC (permalink / raw)
To: ccaulfie, teigland; +Cc: cluster-devel, linux-kernel, hch
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>
---
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);
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dlm: config: Fix ENOMEM failures in make_cluster()
2016-03-22 17:36 [PATCH] dlm: config: Fix ENOMEM failures in make_cluster() Andrew Price
@ 2016-03-22 18:24 ` Christoph Hellwig
2016-03-29 15:18 ` [Cluster-devel] " Andrew Price
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-03-22 18:24 UTC (permalink / raw)
To: Andrew Price; +Cc: ccaulfie, teigland, cluster-devel, linux-kernel, hch
On Tue, Mar 22, 2016 at 05:36:34PM +0000, 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.
>
> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
> Signed-off-by: Andrew Price <anprice@redhat.com>
Oops, sorry. Thanks for fixing this up!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cluster-devel] [PATCH] dlm: config: Fix ENOMEM failures in make_cluster()
2016-03-22 17:36 [PATCH] dlm: config: Fix ENOMEM failures in make_cluster() Andrew Price
2016-03-22 18:24 ` Christoph Hellwig
@ 2016-03-29 15:18 ` Andrew Price
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Price @ 2016-03-29 15:18 UTC (permalink / raw)
To: ccaulfie, teigland; +Cc: cluster-devel, linux-kernel, hch
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 <rpeterso@redhat.com>
> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
> Signed-off-by: Andrew Price <anprice@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);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-29 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-22 17:36 [PATCH] dlm: config: Fix ENOMEM failures in make_cluster() Andrew Price
2016-03-22 18:24 ` Christoph Hellwig
2016-03-29 15:18 ` [Cluster-devel] " Andrew Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox