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:   Thu, 24 Oct 2019 09:23:33 -0700
From:   Joe Perches <joe@...ches.com>
To:     Valdis Kletnieks <valdis.kletnieks@...edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-fsdevel@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/15] staging: exfat: Clean up return codes -
 FFS_PERMISSIONERR

On Thu, 2019-10-24 at 11:53 -0400, Valdis Kletnieks wrote:
> Convert FFS_PERMISSIONERR to -EPERM
[]
> diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c
[]
> @@ -2526,7 +2526,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry)
>  
>  	err = ffsRemoveFile(dir, &(EXFAT_I(inode)->fid));
>  	if (err) {
> -		if (err == FFS_PERMISSIONERR)
> +		if (err == -EPERM)
>  			err = -EPERM;
>  		else
>  			err = -EIO;
[]
> @@ -2746,7 +2746,7 @@ static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
>  	err = ffsMoveFile(old_dir, &(EXFAT_I(old_inode)->fid), new_dir,
>  			  new_dentry);
>  	if (err) {
> -		if (err == FFS_PERMISSIONERR)
> +		if (err == -EPERM)
>  			err = -EPERM;
>  		else if (err == FFS_INVALIDPATH)
>  			err = -EINVAL;

These test and assign to same value blocks look kinda silly.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ