> hi, > >> y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: >>> hi, >>> >>> > Module Name: src >>> > Committed By: rmind >>> > Date: Wed Oct 27 02:58:05 UTC 2010 >>> > >>> > Modified Files: >>> > src/sys/kern: sys_descrip.c >>> > >>> > Log Message: >>> > do_posix_fadvise: check for a negative length; truncate the offset and >>> > round the end-offset, not vice-versa. >>> >>> the latter part seems incorrect and makes putpages panic. >>> note that round_page(INT64_MAX) is negative. >> >> Good point. >> >>> >>> how about the attached patch? >> >> Consider offset = (INT64_MAX - PAGE_SIZE) and len = PAGE_SIZE. That would >> still panic.. > > heh, right. > > then, how about: > if (round_page(offset) < trunc_page(endoffset)) {
&& offset < round_page(offset) YAMAMOTO Takashi > putpages; > } else { > do nothing; > } > > YAMAMOTO Takashi > >> >> -- >> Mindaugas