From: Xiaotian Feng <dfeng@redhat.com>
To: axboe@kernel.dk, tj@kernel.org, linux-kernel@vger.kernel.org
Cc: Xiaotian Feng <dfeng@redhat.com>
Subject: [PATCH] block: fix improper kobject release in blk_integrity_unregister
Date: Fri, 24 Jul 2009 16:52:28 +0800 [thread overview]
Message-ID: <1248425548-30600-1-git-send-email-dfeng@redhat.com> (raw)
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@redhat.com>
---
block/blk-integrity.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index 73e28d3..15c6308 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -379,6 +379,7 @@ void blk_integrity_unregister(struct gendisk *disk)
kobject_uevent(&bi->kobj, KOBJ_REMOVE);
kobject_del(&bi->kobj);
+ kobject_put(&bi->kobj);
kmem_cache_free(integrity_cachep, bi);
disk->integrity = NULL;
}
--
1.6.2.5
next reply other threads:[~2009-07-24 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-24 8:52 Xiaotian Feng [this message]
2009-07-28 7:10 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248425548-30600-1-git-send-email-dfeng@redhat.com \
--to=dfeng@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome