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:   Wed, 26 Dec 2018 13:19:32 +0800
From:   Qu Wenruo <quwenruo.btrfs@....com>
To:     Kangjie Lu <kjlu@....edu>
Cc:     pakki001@....edu, Chris Mason <clm@...com>,
        Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: add a check for sysfs_create_group



On 2018/12/26 上午11:46, Kangjie Lu wrote:
> In case sysfs_create_group fails, let's check its return value and
> issues an error message.
> 
> Signed-off-by: Kangjie Lu <kjlu@....edu>
> ---
>  fs/btrfs/sysfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index 3717c864ba23..62529153a51a 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -889,6 +889,8 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
>  	 */
>  	sysfs_remove_group(fsid_kobj, &btrfs_feature_attr_group);
>  	ret = sysfs_create_group(fsid_kobj, &btrfs_feature_attr_group);
> +	if (ret)
> +		pr_err("failed to create btrfs_feature_attr_group.\n");

Btrfs have better error message infrastructures (e.g. distinguish
different filesystems).

Please use btrfs_error() or btrfs_warn() instead.

Despite that, I think the patch looks good.

Thanks,
Qu

>  }
>  
>  static int btrfs_init_debugfs(void)
> 



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ