mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
linux: cap mount id to INT_MAX
linux stores mount id as a int32_t, using xor would make it becomes negative in some cases. As a result, we cap the value to INT_MAX to prevent getting a negative value from userspace. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D59202
This commit is contained in:
1 parent
5fb07bbcd5
commit
23626eb9e3
1 file changed
+2
-1
@@ -621,7 +621,8 @@ linprocfs_doprocmountinfo(PFS_FILL_ARGS)
|
||||
* (5) mountto path
|
||||
*/
|
||||
sbuf_printf(sb, "%u 0 0:0 / %s ",
|
||||
sp->f_fsid.val[0] ^ sp->f_fsid.val[1], mntto);
|
||||
(sp->f_fsid.val[0] ^ sp->f_fsid.val[1]) & 0x7fffffff,
|
||||
mntto);
|
||||
/* (6) mount options */
|
||||
_sbuf_mntoptions_helper(sb, sp->f_flags);
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user