vm_map_lock_read() does not increment map->timestamp, so we should
compare map->timestamp with saved timestamp after map read lock is reacquired, not with saved timestamp + 1. The only consequence of the +1 was unconditional lookup of the next map entry, though. Tested by: pho Approved by: des MFC after: 2 weeks
This commit is contained in:
parent
c990bf0896
commit
22a448c4d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186563
@ -980,7 +980,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
|
||||
error = 0;
|
||||
break;
|
||||
}
|
||||
if (last_timestamp + 1 != map->timestamp) {
|
||||
if (last_timestamp != map->timestamp) {
|
||||
/*
|
||||
* Look again for the entry because the map was
|
||||
* modified while it was unlocked. Specifically,
|
||||
|
@ -224,7 +224,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
|
||||
error = 0;
|
||||
break;
|
||||
}
|
||||
if (last_timestamp + 1 != map->timestamp) {
|
||||
if (last_timestamp != map->timestamp) {
|
||||
/*
|
||||
* Look again for the entry because the map was
|
||||
* modified while it was unlocked. Specifically,
|
||||
|
@ -1500,7 +1500,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS)
|
||||
vm_map_lock_read(map);
|
||||
if (error)
|
||||
break;
|
||||
if (last_timestamp + 1 != map->timestamp) {
|
||||
if (last_timestamp != map->timestamp) {
|
||||
vm_map_lookup_entry(map, addr - 1, &tmp_entry);
|
||||
entry = tmp_entry;
|
||||
}
|
||||
@ -1677,7 +1677,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_ARGS)
|
||||
vm_map_lock_read(map);
|
||||
if (error)
|
||||
break;
|
||||
if (last_timestamp + 1 != map->timestamp) {
|
||||
if (last_timestamp != map->timestamp) {
|
||||
vm_map_lookup_entry(map, addr - 1, &tmp_entry);
|
||||
entry = tmp_entry;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user