svn commit: r325285 - head/sys/amd64/amd64

Oliver Pinter oliver.pinter at hardenedbsd.org
Sat Nov 4 12:43:38 UTC 2017


On 11/3/17, Morris, Don <Don.Morris at dell.com> wrote:
>> Modified: head/sys/amd64/amd64/pmap.c
>> ==============================================================================
>> --- head/sys/amd64/amd64/pmap.c	Wed Nov  1 16:32:11 2017	(r325284)
>> +++ head/sys/amd64/amd64/pmap.c	Wed Nov  1 18:06:44 2017	(r325285)
>> @@ -2892,8 +2892,8 @@ reclaim_pv_chunk_leave_pmap(pmap_t pmap, pmap_t
>> locked
>  > static vm_page_t
>  > reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp)
>  > {
>> -	struct pv_chunk *pc, *pc_marker;
>> -	struct pv_chunk_header pc_marker_b;
>> +	struct pv_chunk *pc, *pc_marker, *pc_marker_end;
>> +	struct pv_chunk_header pc_marker_b, pc_marker_end_b;
>>  	struct md_page *pvh;
>>  	pd_entry_t *pde;
>> 	pmap_t next_pmap, pmap;
>> @@ -2906,6 +2906,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock
>> **l
>>  	uint64_t inuse;
>>  	int bit, field, freed;
>> 	bool start_di;
>> +	static int active_reclaims = 0;
>>
>>  	PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED);
>> 	KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL"));
>> @@ -2914,7 +2915,9 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock
>> **l
>> 	PG_G = PG_A = PG_M = PG_RW = 0;
>> 	SLIST_INIT(&free);
>> 	bzero(&pc_marker_b, sizeof(pc_marker_b));
>> +	bzero(&pc_marker_end, sizeof(pc_marker_end));
>>  	pc_marker = (struct pv_chunk *)&pc_marker_b;
>> +	pc_marker_end = (struct pv_chunk *)&pc_marker_end_b;
>
> Shouldn't the additional bzero here be of pc_marker_end_b, not
> pc_marker_end? Minor bug -- but just saying...

Sure, sizeof(pointer) returns 8 (on amd64) instead of sizeof(struct).

>
> Don Morris
> (Statements are not those of my employer, etc, etc...)
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"
>


More information about the svn-src-head mailing list