lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090728071043.GP4148@kernel.dk>
Date:	Tue, 28 Jul 2009 09:10:44 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Xiaotian Feng <dfeng@...hat.com>
Cc:	tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: fix improper kobject release in
	blk_integrity_unregister

On Fri, Jul 24 2009, Xiaotian Feng wrote:
> blk_integrity_unregister should use kobject_put to release the kobject,
> otherwise after bi is freed, memory of bi->kobj->name is leaked.

Applied, thanks.

> 
> Signed-off-by: Xiaotian Feng <dfeng@...hat.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
> 

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ