diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2013-01-31 03:34:53 -0500 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2013-02-20 02:21:23 -0500 |
commit | 293be8de49a05ca510069e7ab2d5057c728dd155 (patch) | |
tree | 4cc81c9edb1f327669f47cc4df6c15cf7fcf9f0c /arch/blackfin | |
parent | c73bc7026d7785fc627a8da7bbdd9d172001a59f (diff) |
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>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/include/asm/uaccess.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 461bb542e2e8..57701c3b8a59 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h | |||
@@ -191,6 +191,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n) | |||
191 | memcpy((void __force *)to, from, n); | 191 | memcpy((void __force *)to, from, n); |
192 | else | 192 | else |
193 | return n; | 193 | return n; |
194 | SSYNC(); | ||
194 | return 0; | 195 | return 0; |
195 | } | 196 | } |
196 | 197 | ||