Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157767198
D9233.id24168.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
991 B
Referenced Files
None
Subscribers
None
D9233.id24168.diff
View Options
Index: sys/kern/imgact_elf.c
===================================================================
--- sys/kern/imgact_elf.c
+++ sys/kern/imgact_elf.c
@@ -1225,10 +1225,24 @@
core_write(struct coredump_params *p, void *base, size_t len, off_t offset,
enum uio_seg seg)
{
+ int error;
- return (vn_rdwr_inchunks(UIO_WRITE, p->vp, base, len, offset,
+ error = vn_rdwr_inchunks(UIO_WRITE, p->vp, base, len, offset,
seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED,
- p->active_cred, p->file_cred, NULL, p->td));
+ p->active_cred, p->file_cred, NULL, p->td);
+
+ /*
+ * EFAULT is a non-fatal error that we can get, for example,
+ * if the segment is backed by a file but extends beyond its
+ * end.
+ */
+ if (error == EFAULT) {
+ log(LOG_WARNING, "Failed to fully fault in a core file segment "
+ "at VA %p with size %zx to be written at offset 0x%jx "
+ "for process %s\n", base, len, offset, curproc->p_comm);
+ error = 0;
+ }
+ return (error);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 25, 11:38 PM (13 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33519036
Default Alt Text
D9233.id24168.diff (991 B)
Attached To
Mode
D9233: don't abort writing of a core dump after EFAULT
Attached
Detach File
Event Timeline
Log In to Comment