Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions fs/vfs/fs_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ ssize_t file_readv(FAR struct file *filep,
return -EFAULT;
}

/* -------------------- DO NOT REMOVE --------------------
* Only for kernel builds with CONFIG_ARCH_TEXT_VBASE == 0.
* In this case we have to allow the NULL buffer otherwise
* kernel builds will fail to load elf binaries found at 0.
*/

#if !defined(CONFIG_BUILD_KERNEL) || CONFIG_ARCH_TEXT_VBASE != 0

/* Are all iov_base accessible? */

for (ret = 0; ret < iovcnt; ret++)
Expand All @@ -185,6 +193,7 @@ ssize_t file_readv(FAR struct file *filep,
return -EFAULT;
}
}
#endif

ret = -EBADF;

Expand Down
Loading