Page MenuHomeFreeBSD

D43179.diff
No OneTemporary

D43179.diff

diff --git a/sys/kern/subr_stats.c b/sys/kern/subr_stats.c
--- a/sys/kern/subr_stats.c
+++ b/sys/kern/subr_stats.c
@@ -1107,13 +1107,19 @@
*/
#ifdef _KERNEL
if (flags & SB_CLONE_USRDSTNOFAULT)
- copyout_nofault(src, *dst,
+ error = copyout_nofault(src, *dst,
offsetof(struct statsblob, maxsz));
else if (flags & SB_CLONE_USRDST)
- copyout(src, *dst, offsetof(struct statsblob, maxsz));
+ error = copyout(src, *dst,
+ offsetof(struct statsblob, maxsz));
else
#endif
memcpy(*dst, src, offsetof(struct statsblob, maxsz));
+#ifdef _KERNEL
+ if (error != 0)
+ goto out;
+#endif
+
if (dstmaxsz >= src->cursz) {
postcurszlen = src->cursz -
@@ -1125,14 +1131,18 @@
}
#ifdef _KERNEL
if (flags & SB_CLONE_USRDSTNOFAULT)
- copyout_nofault(&(src->cursz), &((*dst)->cursz),
+ error = copyout_nofault(&(src->cursz), &((*dst)->cursz),
postcurszlen);
else if (flags & SB_CLONE_USRDST)
- copyout(&(src->cursz), &((*dst)->cursz), postcurszlen);
+ error = copyout(&(src->cursz), &((*dst)->cursz),
+ postcurszlen);
else
#endif
memcpy(&((*dst)->cursz), &(src->cursz), postcurszlen);
}
+#ifdef _KERNEL
+out:
+#endif
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 10:05 AM (5 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17879169
Default Alt Text
D43179.diff (1 KB)

Event Timeline