All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
@ 2017-03-08 10:18 zhangshuxiaomi
  2017-03-09 12:38 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: zhangshuxiaomi @ 2017-03-08 10:18 UTC (permalink / raw)
  To: gregkh, arve, riandrews, devel, linux-kernel; +Cc: zhangshuxiao

From: zhangshuxiao <zhangshuxiao@xiaomi.com>

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 <zhangshuxiao@xiaomi.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
@ 2017-04-06 14:30 zhangshuxiaomi
  2017-04-06 15:30 ` Greg Hackmann
  0 siblings, 1 reply; 7+ messages in thread
From: zhangshuxiaomi @ 2017-04-06 14:30 UTC (permalink / raw)
  To: gregkh; +Cc: ghackmann, arve, riandrews, devel, linux-kernel, zhangshuxiao

From: zhangshuxiao <zhangshuxiao@xiaomi.com>

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: Shuxiao Zhang <zhangshuxiao@xiaomi.com>
Tested-by: Greg Hackmann <ghackmann@google.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
@ 2017-03-08 10:11 zhangshuxiaomi
  0 siblings, 0 replies; 7+ messages in thread
From: zhangshuxiaomi @ 2017-03-08 10:11 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel; +Cc: zhangshuxiao

From: zhangshuxiao <zhangshuxiao@xiaomi.com>

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 <zhangshuxiao@xiaomi.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-06 17:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 10:18 [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK zhangshuxiaomi
2017-03-09 12:38 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-04-06 14:30 zhangshuxiaomi
2017-04-06 15:30 ` Greg Hackmann
2017-04-06 17:08   ` Greg KH
2017-04-06 17:25     ` Greg Hackmann
2017-03-08 10:11 zhangshuxiaomi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.