Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

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

 



On Mon, 29 Sep 2014, Frantisek Hrbata wrote:
> V2: fix pfn check in valid_mmap_phys_addr_range, thanks to Dave Hansen

AFAICT, Dave also asked you to change size_t count into something more
intuitive, i.e. nr_bytes or such.

> +int valid_mmap_phys_addr_range(unsigned long pfn, size_t count)

And right he is. I really had to look twice to see that count is
actually number of bytes and not number of pages, which is what you
expect after pfn.

> +{
> +	return arch_pfn_possible(pfn + (count >> PAGE_SHIFT));
> +}

Thanks,

	tglx

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]