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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 12 Oct 2008 16:31:47 -0400
From:	Theodore Tso <tytso@....edu>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	cmm@...ibm.com, sandeen@...hat.com, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Use an rb tree for tracking blocks freed during
	transaction.

On Thu, Oct 09, 2008 at 09:02:07PM +0530, Aneesh Kumar K.V wrote:
> With this patch we track the block freed during a transaction using
> rb tree. We also make sure contiguos blocks freed are collected
> in one rb node.

There seems to be a memory leak.  Over time, the number of active
objects in ext4_free_block_extents goes up.  You can check via:

	grep ext4_free_block_extents /proc/slabinfo 

I think the problem is here:

> +	/* Now try to see the extent can be merged to left and right */
> +	node = rb_prev(new_node);
> +	if (node) {
> +		entry = rb_entry(node, struct ext4_free_data, node);
> +		if (can_merge(entry, new_entry)) {
> +			new_entry->start_blk = entry->start_blk;
> +			new_entry->count += entry->count;
> +			rb_erase(node, &(db->bb_free_root));
> +			list_del(&entry->list);
>  		}
> +	}

We aren't freeing new_entry in ext4_mb_free_metadata() in the case
where the extent can be merged with an existing node in the rbtree.

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

Powered by blists - more mailing lists