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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 17 Jul 2020 15:35:22 +0900
From:   Tetsuhiro Kohada <kohada.t2@...il.com>
To:     youngjun <her0gyugyu@...il.com>,
        Namjae Jeon <namjae.jeon@...sung.com>,
        Sungjong Seo <sj1557.seo@...sung.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] exfat: change exfat_set_vol_flags() return type void.

On 2020/07/15 22:50, youngjun wrote:
> exfat_set_vol_flags() always return 0.
> So, change function return type as void.

On the contrary, I think it should be fixed to return an appropriate error.


> @@ -114,7 +113,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag)
>   	 * if this volume has been mounted with read-only
>   	 */
>   	if (sb_rdonly(sb))
> -		return 0;
> +		return;

Some other FileSystems return -EROFS.
exfat-fs may also need to return it.
(If so, the caller will also need to be modified)


>   	p_boot->vol_flags = cpu_to_le16(new_flag);
>   
> @@ -128,7 +127,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag)
>   
>   	if (sync)
>   		sync_dirty_buffer(sbi->boot_bh);
> -	return 0;
> +	return;

Shouldn't the execution result be returned when sync_dirty_buffer() is executed?


BR
---
Tetsuhiro Kohada <kohada.t2@...il.com>

Powered by blists - more mailing lists