mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
Discontinue zero-length g_ctl arguments as "just give him this pointer"
transfers. The necessary context for calling copyin() isn't available anyway and automatic code-validation chokes on this.
This commit is contained in:
parent
ddd8ec50b0
commit
e8cde1ac6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140367
@ -173,15 +173,10 @@ gctl_copyin(struct gctl_req *req)
|
||||
}
|
||||
ap[i].name = p;
|
||||
ap[i].flag |= GCTL_PARAM_NAMEKERNEL;
|
||||
if (ap[i].len < 0) {
|
||||
if (ap[i].len <= 0) {
|
||||
error = gctl_error(req, "negative param length");
|
||||
break;
|
||||
}
|
||||
if (ap[i].len == 0) {
|
||||
ap[i].kvalue = ap[i].value;
|
||||
ap[i].flag |= GCTL_PARAM_VALUEKERNEL;
|
||||
continue;
|
||||
}
|
||||
p = geom_alloc_copyin(req, ap[i].value, ap[i].len);
|
||||
if (p == NULL)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user