char *srcgrp = NULL;
char *dstgrp = NULL;
void *param = NULL;
+ int ret = 0;
int rc = -ENOMEM;
if (args->lstio_tes_resultp == NULL ||
+ args->lstio_tes_retp == NULL ||
args->lstio_tes_bat_name == NULL || /* no specified batch */
args->lstio_tes_bat_nmlen <= 0 ||
args->lstio_tes_bat_nmlen > LST_NAME_SIZE ||
args->lstio_tes_concur,
args->lstio_tes_dist, args->lstio_tes_span,
srcgrp, dstgrp, param, args->lstio_tes_param_len,
- args->lstio_tes_resultp);
+ &ret, args->lstio_tes_resultp);
+
+ if (ret != 0)
+ rc = (copy_to_user(args->lstio_tes_retp, &ret, sizeof(ret))) ?
+ -EFAULT : 0;
out:
if (name != NULL)
LIBCFS_FREE(name, args->lstio_tes_bat_nmlen + 1);