projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c21a534
)
ocfs2_dlmfs: Fix math error when reading LVB.
author
Joel Becker
<joel.becker@oracle.com>
Fri, 23 Apr 2010 22:24:59 +0000
(15:24 -0700)
committer
Joel Becker
<joel.becker@oracle.com>
Fri, 23 Apr 2010 22:24:59 +0000
(15:24 -0700)
When asked for a partial read of the LVB in a dlmfs file, we can
accidentally calculate a negative count.
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/dlmfs/dlmfs.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ocfs2/dlmfs/dlmfs.c
b/fs/ocfs2/dlmfs/dlmfs.c
index a99d1eafa8e2e4f12d92efb0ee21873c7257087a..b83d6107a1f5e0eb9e63c4dae29746c3b3888fce 100644
(file)
--- a/
fs/ocfs2/dlmfs/dlmfs.c
+++ b/
fs/ocfs2/dlmfs/dlmfs.c
@@
-262,7
+262,7
@@
static ssize_t dlmfs_file_read(struct file *filp,
if ((count + *ppos) > i_size_read(inode))
readlen = i_size_read(inode) - *ppos;
else
- readlen = count
- *ppos
;
+ readlen = count;
lvb_buf = kmalloc(readlen, GFP_NOFS);
if (!lvb_buf)