+ block-fix-improper-kobject-release-in-blk_integrity_unregister.patch added to -mm tree

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

 



The patch titled
     block: fix improper kobject release in blk_integrity_unregister
has been added to the -mm tree.  Its filename is
     block-fix-improper-kobject-release-in-blk_integrity_unregister.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/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: block: fix improper kobject release in blk_integrity_unregister
From: Xiaotian Feng <dfeng@xxxxxxxxxx>

blk_integrity_unregister should use kobject_put to release the kobject,
otherwise after bi is freed, memory of bi->kobj->name is leaked.

Signed-off-by: Xiaotian Feng <dfeng@xxxxxxxxxx>
Cc: Jens Axboe <jens.axboe@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 block/blk-integrity.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN block/blk-integrity.c~block-fix-improper-kobject-release-in-blk_integrity_unregister block/blk-integrity.c
--- a/block/blk-integrity.c~block-fix-improper-kobject-release-in-blk_integrity_unregister
+++ a/block/blk-integrity.c
@@ -379,6 +379,7 @@ void blk_integrity_unregister(struct gen
 
 	kobject_uevent(&bi->kobj, KOBJ_REMOVE);
 	kobject_del(&bi->kobj);
+	kobject_put(&bi->kobj);
 	kmem_cache_free(integrity_cachep, bi);
 	disk->integrity = NULL;
 }
_

Patches currently in -mm which might be from dfeng@xxxxxxxxxx are

linux-next.patch
block-fix-improper-kobject-release-in-blk_integrity_unregister.patch
cgroups-make-unlock-sequence-in-cgroup_get_sb-consistent.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 Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux