Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108616673
D44585.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
952 B
Referenced Files
None
Subscribers
None
D44585.diff
View Options
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
@@ -1078,9 +1078,9 @@
stats_v1_blob_clone(struct statsblobv1 **dst, size_t dstmaxsz,
struct statsblobv1 *src, uint32_t flags)
{
- int error;
+ int error, tmperror;
- error = 0;
+ error = tmperror = 0;
if (src == NULL || dst == NULL ||
src->cursz < sizeof(struct statsblob) ||
@@ -1131,14 +1131,16 @@
}
#ifdef _KERNEL
if (flags & SB_CLONE_USRDSTNOFAULT)
- error = copyout_nofault(&(src->cursz), &((*dst)->cursz),
+ tmperror = copyout_nofault(&(src->cursz), &((*dst)->cursz),
postcurszlen);
else if (flags & SB_CLONE_USRDST)
- error = copyout(&(src->cursz), &((*dst)->cursz),
+ tmperror = copyout(&(src->cursz), &((*dst)->cursz),
postcurszlen);
else
#endif
memcpy(&((*dst)->cursz), &(src->cursz), postcurszlen);
+
+ error = error ? error : tmperror;
}
#ifdef _KERNEL
out:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 10:08 PM (8 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16216159
Default Alt Text
D44585.diff (952 B)
Attached To
Mode
D44585: Reinstate returning EOVERFLOW from stats_v1_blob_clone()
Attached
Detach File
Event Timeline
Log In to Comment