FreeBSD Bugzilla – Attachment 216234 Details for
Bug 247790
PIDs are no longer randomized after reaching pid_max
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Wrap `trypid' with a modulus.
patch-sys_kern_kern__fork.c (text/plain), 366 bytes, created by
kd-dev
on 2020-07-05 20:30:37 UTC
(
hide
)
Description:
Wrap `trypid' with a modulus.
Filename:
MIME Type:
Creator:
kd-dev
Created:
2020-07-05 20:30:37 UTC
Size:
366 bytes
patch
obsolete
>Index: sys/kern/kern_fork.c >=================================================================== >--- sys/kern/kern_fork.c (revision 362913) >+++ sys/kern/kern_fork.c (working copy) >@@ -276,7 +276,7 @@ > } > retry: > if (trypid >= pid_max) >- trypid = 2; >+ trypid = trypid % pid_max + 2; > > bit_ffc_at(&proc_id_pidmap, trypid, pid_max, &result); > if (result == -1) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247790
: 216234