Actually use the iterating variable in the for loop when trying to avoid
overflow. Reported by: Vladislav Shabanov vs at rambler-co dot ru MFC after: 1 week Glanced at: alfred
This commit is contained in:
parent
36f45138fb
commit
a4c24c66bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146164
@ -957,7 +957,7 @@ shminit()
|
||||
|
||||
TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
|
||||
for (i = PAGE_SIZE; i > 0; i--) {
|
||||
shminfo.shmmax = shminfo.shmall * PAGE_SIZE;
|
||||
shminfo.shmmax = shminfo.shmall * i;
|
||||
if (shminfo.shmmax >= shminfo.shmall)
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user