Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177948719
D61992.1795626231.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D61992.1795626231.diff
View Options
diff --git a/lib/libsys/kldstat.2 b/lib/libsys/kldstat.2
--- a/lib/libsys/kldstat.2
+++ b/lib/libsys/kldstat.2
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 28, 2012
+.Dd November 24, 2026
.Dt KLDSTAT 2
.Os
.Sh NAME
@@ -55,12 +55,8 @@
.Ed
.Bl -tag -width XXXaddress
.It version
-This field is set to the size of the structure mentioned above by the code
-calling
-.Fn kldstat ,
-and not
-.Fn kldstat
-itself.
+This field must be set to the size of the structure mentioned above by
+the caller and is left unmodified on return.
.It name
The name of the file referred to by
.Fa fileid .
@@ -94,11 +90,6 @@
The version specified in the
.Fa version
field of stat is not the proper version.
-You would need to rebuild world, the
-kernel, or your application, if this error occurs, given that you did properly
-fill in the
-.Fa version
-field.
.It Bq Er EFAULT
There was a problem copying one, some, or all of the fields into
.Fa stat
diff --git a/lib/libsys/modstat.2 b/lib/libsys/modstat.2
--- a/lib/libsys/modstat.2
+++ b/lib/libsys/modstat.2
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 15, 2008
+.Dd November 24, 2026
.Dt MODSTAT 2
.Os
.Sh NAME
@@ -60,12 +60,8 @@
.Ed
.Bl -tag -width XXXaddress
.It version
-This field is set to the size of the structure mentioned above by the code
-calling
-.Fn modstat ,
-and not
-.Fn modstat
-itself.
+This field must be set to the size of the structure mentioned above by
+the caller and is left unmodified on return.
.It name
The name of the module referred to by
.Fa modid .
@@ -93,11 +89,6 @@
The version specified in the
.Fa version
field of stat is not the proper version.
-You would need to rebuild world, the
-kernel, or your application, if this error occurs, given that you did properly
-fill in the
-.Fa version
-field.
.It Bq Er EFAULT
There was a problem copying one, some, or all of the fields into
.Fa stat
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1464,8 +1464,10 @@
stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO);
error = kern_kldstat(td, uap->fileid, stat);
- if (error == 0)
+ if (error == 0) {
+ stat->version = version;
error = copyout(stat, uap->stat, version);
+ }
free(stat, M_TEMP);
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 25, 5:03 PM (23 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41993620
Default Alt Text
D61992.1795626231.diff (2 KB)
Attached To
Mode
D61992: kern_linker: Fix struct version mismatch
Attached
Detach File
Event Timeline