1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Relock user map earlier, to have the lock held when break leaves the

loop earlier due to sbuf error.

Pointy hat to:	me
Submitted by:	dchagin
This commit is contained in:
Konstantin Belousov 2008-12-10 16:11:09 +00:00
parent a097f2cc06
commit c96f374195
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185864
2 changed files with 2 additions and 3 deletions

View File

@ -969,11 +969,11 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
);
if (freename)
free(freename, M_TEMP);
vm_map_lock_read(map);
if (error == -1) {
error = 0;
break;
}
vm_map_lock_read(map);
if (last_timestamp + 1 != map->timestamp) {
/*
* Look again for the entry because the map was

View File

@ -219,12 +219,11 @@ procfs_doprocmap(PFS_FILL_ARGS)
if (freepath != NULL)
free(freepath, M_TEMP);
vm_map_lock_read(map);
if (error == -1) {
error = 0;
break;
}
vm_map_lock_read(map);
if (last_timestamp + 1 != map->timestamp) {
/*
* Look again for the entry because the map was