提交 750ccf68 编写于 作者: A Atsushi Nemoto 提交者: Ralf Baechle

Fix zero length sys_cacheflush

    
Cacheflush(0, 0, 0) was crashing the system.  This is because
flush_icache_range(start, end) tries to flushing whole address space
(0 - ~0UL) if both start and end are zero.
Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 f4c72cc7
......@@ -56,6 +56,8 @@ EXPORT_SYMBOL(_dma_cache_inv);
asmlinkage int sys_cacheflush(unsigned long __user addr,
unsigned long bytes, unsigned int cache)
{
if (bytes == 0)
return 0;
if (!access_ok(VERIFY_WRITE, (void __user *) addr, bytes))
return -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册