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]
Message-ID: <4F9BD297-F7B5-4F10-B700-2806FAEA9359@intel.com>
Date:   Wed, 7 Mar 2018 20:49:03 +0000
From:   "Dilger, Andreas" <andreas.dilger@...el.com>
To:     NeilBrown <neilb@...e.com>
CC:     "Drokin, Oleg" <oleg.drokin@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        James Simmons <jsimmons@...radead.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        Lustre Development List <lustre-devel@...ts.lustre.org>
Subject: Re: [PATCH 01/17] staging: lustre: obd_mount: use correct niduuid
 suffix.

On Mar 1, 2018, at 16:31, NeilBrown <neilb@...e.com> wrote:
> 
> Commit 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") moved
> some sprintf() calls earlier in the code to combine them with
> memory allocation and create kasprintf() calls.
> 
> In one case, this code movement moved the sprintf to a location where the
> values being formatter were different.
> In particular
>       sprintf(niduuid, "%s_%x", mgcname, i);
> was move from *after* the line
>        i = 0;
> to a location where the value of 'i' was at least 1.
> 
> This cause the wrong name to be formatted, and triggers
> 
>       CERROR("del MDC UUID %s failed: rc = %d\n",
>              niduuid, rc);
> 
> at unmount time.
> 
> So use '0' instead of 'i'.
> 
> Fixes: 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf")
> Signed-off-by: NeilBrown <neilb@...e.com>

Reviewed-by: Andreas Dilger <andreas.dilger@...el.com>

> ---
> drivers/staging/lustre/lustre/obdclass/obd_mount.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
> index acc1ea773c9c..f5e8214ac37b 100644
> --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c
> +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
> @@ -243,7 +243,7 @@ int lustre_start_mgc(struct super_block *sb)
> 	libcfs_nid2str_r(nid, nidstr, sizeof(nidstr));
> 	mgcname = kasprintf(GFP_NOFS,
> 			    "%s%s", LUSTRE_MGC_OBDNAME, nidstr);
> -	niduuid = kasprintf(GFP_NOFS, "%s_%x", mgcname, i);
> +	niduuid = kasprintf(GFP_NOFS, "%s_%x", mgcname, 0);
> 	if (!mgcname || !niduuid) {
> 		rc = -ENOMEM;
> 		goto out_free;
> 
> 

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation







Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ