mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Remove the copyinstr call which was trying to copy the pathname in from
user space. It has already been copied in and mp->mnt_stat.f_mntonname has already been initialised by the caller. This fixes a panic on the alpha caused by the fact that the variable 'size' wasn't initialised because the call to copyinstr() bailed out with an EFAULT error.
This commit is contained in:
parent
30c190a0aa
commit
a76decc6f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73383
@ -87,9 +87,6 @@ procfs_mount(mp, path, data, ndp, p)
|
||||
mp->mnt_data = 0;
|
||||
vfs_getnewfsid(mp);
|
||||
|
||||
(void) copyinstr(path, (caddr_t)mp->mnt_stat.f_mntonname, MNAMELEN, &size);
|
||||
bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
|
||||
|
||||
size = sizeof("procfs") - 1;
|
||||
bcopy("procfs", mp->mnt_stat.f_mntfromname, size);
|
||||
bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
|
||||
|
@ -87,9 +87,6 @@ procfs_mount(mp, path, data, ndp, p)
|
||||
mp->mnt_data = 0;
|
||||
vfs_getnewfsid(mp);
|
||||
|
||||
(void) copyinstr(path, (caddr_t)mp->mnt_stat.f_mntonname, MNAMELEN, &size);
|
||||
bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
|
||||
|
||||
size = sizeof("procfs") - 1;
|
||||
bcopy("procfs", mp->mnt_stat.f_mntfromname, size);
|
||||
bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
|
||||
|
Loading…
Reference in New Issue
Block a user