Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ATF t_mlock() babylon5 kernel panics



In article <26375.1552584465%jinx.noi.kre.to@localhost>,
Robert Elz  <kre%munnari.OZ.AU@localhost> wrote:
>

Great debugging :-)

LGTM, at this point I'd merge them:

static int
round_and_check(const struct vm_map *map, vaddr_t *addr, vsize_t *size)
{
	const vsize_t pageoff = (vsize_t)(*addr & PAGE_MASK);

	*addr -= pageoff;

	if (*size != 0) {
		*size += pageoff;
		*size = (vsize_t)round_page(*size);
	}

	if (*addr + *size < *addr)
		return ENOMEM;

	// Make range_test() take const map as it should have in the first place
	return range_test(map, *addr, *size, false);
}


christos



Home | Main Index | Thread Index | Old Index