From: zhangshuxiao <[email protected]>
vfs_llseek will check whether the file mode has
FMODE_LSEEK, no return failure. But ashmem can be
lseek, so add FMODE_LSEEK to ashmem file.
Signed-off-by: zhangshuxiao <[email protected]>
---
drivers/staging/android/ashmem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 3f11332..e4530ac 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -392,6 +392,7 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
ret = PTR_ERR(vmfile);
goto out;
}
+ vmfile->f_mode |= FMODE_LSEEK;
asma->file = vmfile;
}
get_file(asma->file);
--
1.9.1
On Wed, Mar 08, 2017 at 06:18:32PM +0800, [email protected] wrote:
> From: zhangshuxiao <[email protected]>
>
> vfs_llseek will check whether the file mode has
> FMODE_LSEEK, no return failure. But ashmem can be
> lseek, so add FMODE_LSEEK to ashmem file.
Really? What is causing this failure? I haven't heard from anyone else
about this issue, is there something different in your userspace
framework?
>
> Signed-off-by: zhangshuxiao <[email protected]>
I need a "full" name for a signed-off-by: please.
thanks,
greg k-h