HomeFreeBSD

Change the check for 'size' wrapping around to zero in kern_mmap to account

Description

Change the check for 'size' wrapping around to zero in kern_mmap to account
for both the lower and upper bound modifications. Change the error returned
to ENOMEM. Rename the parameter size to len and make size a local variable
that stores the value of len after it has been modified.

This addresses concerns expressed by Bruce Evans after r348843.

Reported by: brde@optusnet.com.au
Reviewed by: kib, markj (mentors)
MFC after: 3 days
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D20592

Details

Provenance
dougmAuthored on
Reviewer
kib
Differential Revision
D20592: improve error checking for modifcations to mmap len parameter
Parents
rS348878: Add a bus_add_child device method to bcm2835_sdhci.
Branches
Unknown
Tags
Unknown