patch "staging: android: ashmem: lseek failed due to no FMODE_LSEEK." added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
97fbfef6bd597888485b653175fb846c6998b60cMon Sep 17 00:00:00 2001
From: Shuxiao Zhang <[email protected]>
Date: Thu, 6 Apr 2017 22:30:29 +0800
Subject: staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
vfs_llseek will check whether the file mode hasFMODE_LSEEK, no return failure. But ashmem can be
lseek, so add FMODE_LSEEK to ashmem file.
Comment From Greg Hackmann:
ashmem_llseek() passes the llseek() call through to the backing shmem file. 91360b02ab48 ("ashmem: use vfs_llseek()") changed this from directly calling the file's llseek() op into a VFS layer call. This also adds a check for the FMODE_LSEEK bit, so without that bit ashmem_llseek() now always fails with -ESPIPE.
--- drivers/staging/android/ashmem.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/android/ashmem.c +1 -0
@@ -409,6 +409,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);
Signature · 1 line
2.12.2