* [Cluster-devel] [PATCH 1/1] fs/gfs2/lock_dlm.c: replace count*size kzalloc by kcalloc
@ 2014-06-25 18:40 ` Fabian Frederick
0 siblings, 0 replies; 4+ messages in thread
From: Fabian Frederick @ 2014-06-25 18:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
kcalloc manages count*sizeof overflow.
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: cluster-devel at redhat.com
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/gfs2/lock_dlm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index 91f274d..4fafea1 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
new_size = old_size + RECOVER_SIZE_INC;
- submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
- result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
+ submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
+ result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
if (!submit || !result) {
kfree(submit);
kfree(result);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 1/1] fs/gfs2/lock_dlm.c: replace count*size kzalloc by kcalloc
@ 2014-06-25 18:40 ` Fabian Frederick
0 siblings, 0 replies; 4+ messages in thread
From: Fabian Frederick @ 2014-06-25 18:40 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Steven Whitehouse, cluster-devel
kcalloc manages count*sizeof overflow.
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: cluster-devel@redhat.com
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/gfs2/lock_dlm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index 91f274d..4fafea1 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
new_size = old_size + RECOVER_SIZE_INC;
- submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
- result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
+ submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
+ result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
if (!submit || !result) {
kfree(submit);
kfree(result);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Cluster-devel] [PATCH 1/1] fs/gfs2/lock_dlm.c: replace count*size kzalloc by kcalloc
2014-06-25 18:40 ` Fabian Frederick
@ 2014-06-26 11:04 ` Steven Whitehouse
-1 siblings, 0 replies; 4+ messages in thread
From: Steven Whitehouse @ 2014-06-26 11:04 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Now in the -nmw git tree. Thanks,
Steve.
On 25/06/14 19:40, Fabian Frederick wrote:
> kcalloc manages count*sizeof overflow.
>
> Cc: Steven Whitehouse <swhiteho@redhat.com>
> Cc: cluster-devel at redhat.com
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/gfs2/lock_dlm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
> index 91f274d..4fafea1 100644
> --- a/fs/gfs2/lock_dlm.c
> +++ b/fs/gfs2/lock_dlm.c
> @@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
>
> new_size = old_size + RECOVER_SIZE_INC;
>
> - submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
> - result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
> + submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
> + result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
> if (!submit || !result) {
> kfree(submit);
> kfree(result);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] fs/gfs2/lock_dlm.c: replace count*size kzalloc by kcalloc
@ 2014-06-26 11:04 ` Steven Whitehouse
0 siblings, 0 replies; 4+ messages in thread
From: Steven Whitehouse @ 2014-06-26 11:04 UTC (permalink / raw)
To: Fabian Frederick, linux-kernel; +Cc: cluster-devel
Hi,
Now in the -nmw git tree. Thanks,
Steve.
On 25/06/14 19:40, Fabian Frederick wrote:
> kcalloc manages count*sizeof overflow.
>
> Cc: Steven Whitehouse <swhiteho@redhat.com>
> Cc: cluster-devel@redhat.com
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/gfs2/lock_dlm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
> index 91f274d..4fafea1 100644
> --- a/fs/gfs2/lock_dlm.c
> +++ b/fs/gfs2/lock_dlm.c
> @@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
>
> new_size = old_size + RECOVER_SIZE_INC;
>
> - submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
> - result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
> + submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
> + result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
> if (!submit || !result) {
> kfree(submit);
> kfree(result);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-26 11:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 18:40 [Cluster-devel] [PATCH 1/1] fs/gfs2/lock_dlm.c: replace count*size kzalloc by kcalloc Fabian Frederick
2014-06-25 18:40 ` Fabian Frederick
2014-06-26 11:04 ` [Cluster-devel] " Steven Whitehouse
2014-06-26 11:04 ` Steven Whitehouse
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.