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
3589904ee2
commit
dc91c6bf08
@ -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