Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1595020 > unrolled thread

[PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.

Started byzhangshuxiaomi@gmail.com
First post2017-03-08 11:30 +0100
Last post2017-03-09 13:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK. zhangshuxiaomi@gmail.com - 2017-03-08 11:30 +0100
    Re: [PATCH] staging: android: ashmem: lseek failed due to no  FMODE_LSEEK. Greg KH <gregkh@linuxfoundation.org> - 2017-03-09 13:40 +0100

#1595020 — [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.

Fromzhangshuxiaomi@gmail.com
Date2017-03-08 11:30 +0100
Subject[PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
Message-ID<tiH0Z-5e8-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1596027 — Re: [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-03-09 13:40 +0100
SubjectRe: [PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
Message-ID<tj5wl-5a0-9@gated-at.bofh.it>
In reply to#1595020
On Wed, Mar 08, 2017 at 06:18:32PM +0800, zhangshuxiaomi@gmail.com wrote:
> 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.

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

I need a "full" name for a signed-off-by: please.

thanks,

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web