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: <20130214113845.GH12339@twin.jikos.cz>
Date:	Thu, 14 Feb 2013 12:38:45 +0100
From:	David Sterba <dsterba@...e.cz>
To:	Kyungsik Lee <kyungsik.lee@....com>
Cc:	Chris Mason <chris.mason@...ionio.com>,
	Li Zefan <lizf@...fujitsu.com>, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org, hyojun.im@....com,
	chan.jeong@....com, raphael.andy.lee@...il.com
Subject: Re: [PATCH] btrfs: fix decompress buffer size

On Thu, Feb 14, 2013 at 06:12:19PM +0900, Kyungsik Lee wrote:
> lzo1x_1_compress() is unnecessarily used for allocating decompress buffer.
> 
> --- a/fs/btrfs/lzo.c
> +++ b/fs/btrfs/lzo.c
> @@ -55,7 +55,7 @@ static struct list_head *lzo_alloc_workspace(void)
>  		return ERR_PTR(-ENOMEM);
>  
>  	workspace->mem = vmalloc(LZO1X_MEM_COMPRESS);
> -	workspace->buf = vmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE));
> +	workspace->buf = vmalloc(PAGE_CACHE_SIZE);

Right, PAGE_CACHE_SIZE is enough in size, but then we don't even need
vmalloc.

david
--
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