Use an unsigned iterator for domain sets.
Otherwise (iter % ds->ds_cnt) is not guaranteed to lie in the range [0, MAXMEMDOM). Reported by: pho Reviewed by: kib Approved by: re (rgrimes) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17374
This commit is contained in:
parent
8696dcdacf
commit
93db904d19
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339075
@ -54,7 +54,7 @@ typedef struct _domainset domainset_t;
|
||||
struct domainset;
|
||||
struct domainset_ref {
|
||||
struct domainset * volatile dr_policy;
|
||||
int dr_iterator;
|
||||
unsigned int dr_iterator;
|
||||
};
|
||||
|
||||
#endif /* !_SYS__DOMAINSET_H_ */
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
struct vm_domainset_iter {
|
||||
struct domainset *di_domain;
|
||||
int *di_iter;
|
||||
unsigned int *di_iter;
|
||||
vm_pindex_t di_offset;
|
||||
int di_flags;
|
||||
uint16_t di_policy;
|
||||
|
Loading…
Reference in New Issue
Block a user