Browse Source

blackfin: sync data in blackfin write buffer

Sync data in blackfin write buffer to DRAM before return from
copy_to_user.
Otherwise, application may read wrong data from stat syscall occasionally.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang 12 years ago
parent
commit
293be8de49
1 changed files with 1 additions and 0 deletions
  1. 1 0
      arch/blackfin/include/asm/uaccess.h

+ 1 - 0
arch/blackfin/include/asm/uaccess.h

@@ -191,6 +191,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
 		memcpy((void __force *)to, from, n);
 	else
 		return n;
+	SSYNC();
 	return 0;
 }