[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.1802261448360.13228@casper.infradead.org>
Date: Mon, 26 Feb 2018 14:48:48 +0000 (GMT)
From: James Simmons <jsimmons@...radead.org>
To: NeilBrown <neilb@...e.com>
cc: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Oleg Drokin <oleg.drokin@...el.com>,
Andreas Dilger <andreas.dilger@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lustre Development List <lustre-devel@...ts.lustre.org>
Subject: Re: [PATCH 3/3] staging: lustre: lnet/selftest: don't ignore status
from lstcon_test_add
> If lstcon_test_add sets 'ret' (passed by reference) to 1,
> then lst_test_add_ioctl() ignores the return value.
> This isn't justified - the return value must be zero for 'ret'
> to be meaningful.
>
> Signed-off-by: NeilBrown <neilb@...e.com>
Reviewed-by: James Simmons <jsimmons@...radead.org>
> ---
> drivers/staging/lustre/lnet/selftest/conctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c b/drivers/staging/lustre/lnet/selftest/conctl.c
> index 51497cf9a832..a2d8092bdeb7 100644
> --- a/drivers/staging/lustre/lnet/selftest/conctl.c
> +++ b/drivers/staging/lustre/lnet/selftest/conctl.c
> @@ -670,7 +670,7 @@ static int lst_test_add_ioctl(struct lstio_test_args *args)
> args->lstio_tes_param_len,
> &ret, args->lstio_tes_resultp);
>
> - if (ret)
> + if (!rc && ret)
> rc = (copy_to_user(args->lstio_tes_retp, &ret,
> sizeof(ret))) ? -EFAULT : 0;
> out:
>
>
>
Powered by blists - more mailing lists