+ z3fold-fix-memory-leak.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: z3fold: fix memory leak
has been added to the -mm tree.  Its filename is
     z3fold-fix-memory-leak.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/z3fold-fix-memory-leak.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/z3fold-fix-memory-leak.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Xidong Wang <wangxidong_97@xxxxxxx>
Subject: z3fold: fix memory leak

In z3fold_create_pool(), the memory allocated by __alloc_percpu() is not
released on the error path that pool->compact_wq , which holds the return
value of create_singlethread_workqueue(), is NULL.  This will result in a
memory leak bug.

Link: http://lkml.kernel.org/r/1522803111-29209-1-git-send-email-wangxidong_97@xxxxxxx
Signed-off-by: Xidong Wang <wangxidong_97@xxxxxxx>
Cc: Vitaly Wool <vitalywool@xxxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/z3fold.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN mm/z3fold.c~z3fold-fix-memory-leak mm/z3fold.c
--- a/mm/z3fold.c~z3fold-fix-memory-leak
+++ a/mm/z3fold.c
@@ -490,6 +490,7 @@ static struct z3fold_pool *z3fold_create
 out_wq:
 	destroy_workqueue(pool->compact_wq);
 out:
+	free_percpu(pool->unbuddied);
 	kfree(pool);
 	return NULL;
 }
_

Patches currently in -mm which might be from wangxidong_97@xxxxxxx are

z3fold-fix-memory-leak.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux