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]
Date:	Tue, 18 Mar 2014 23:40:52 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Namjae Jeon <namjae.jeon@...sung.com>,
	Amit Sahrawat <a.sahrawat@...sung.com>
Subject: Re: [PATCH v4 1/6] fat: add i_disksize to represent uninitialized size

Namjae Jeon <linkinjeon@...il.com> writes:

> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index 9b104f5..0bf0d28 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -300,8 +300,10 @@ void fat_truncate_blocks(struct inode *inode, loff_t offset)
>  	 * This protects against truncating a file bigger than it was then
>  	 * trying to write into the hole.
>  	 */
> -	if (MSDOS_I(inode)->mmu_private > offset)
> +	if (MSDOS_I(inode)->i_disksize > offset) {
>  		MSDOS_I(inode)->mmu_private = offset;
> +		MSDOS_I(inode)->i_disksize = offset;

like inode initialization, we would need to set i_disksize to block boundary?

> +	}
>  
>  	nr_clusters = (offset + (cluster_size - 1)) >> sbi->cluster_bits;
>  
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
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