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:	Fri, 14 Aug 2009 22:12:18 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [patch 02/11] fat: cleanup fat_put_super()

Thomas Gleixner <tglx@...utronix.de> writes:

> unload_nls() can be called with a NULL pointer now. Remove the pointer
> checks and the NULLification of the pointers as the data structure
> which contains the pointers is kfree'd right away.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
> ---
>  fs/fat/inode.c |   16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
>
> Index: linux-2.6-tip/fs/fat/inode.c
> ===================================================================
> --- linux-2.6-tip.orig/fs/fat/inode.c
> +++ linux-2.6-tip/fs/fat/inode.c
> @@ -470,19 +470,11 @@ static void fat_put_super(struct super_b
>  
>  	iput(sbi->fat_inode);
>  
> -	if (sbi->nls_disk) {
> -		unload_nls(sbi->nls_disk);
> -		sbi->nls_disk = NULL;
> -		sbi->options.codepage = fat_default_codepage;
> -	}
> -	if (sbi->nls_io) {
> -		unload_nls(sbi->nls_io);
> -		sbi->nls_io = NULL;
> -	}
> -	if (sbi->options.iocharset != fat_default_iocharset) {
> +	unload_nls(sbi->nls_disk);
> +	unload_nls(sbi->nls_io);

I don't object to this, however, personally I'd prefer to check NULL
explicitly, including brelse().

Thanks.
-- 
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