projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4db107
)
isofs: release buffer head before return
author
Pan Bian
<bianpan2016@163.com>
Mon, 18 Jan 2021 12:04:55 +0000
(
04:04
-0800)
committer
Jan Kara
<jack@suse.cz>
Mon, 25 Jan 2021 16:57:38 +0000
(17:57 +0100)
Release the buffer_head before returning error code in
do_isofs_readdir() and isofs_find_entry().
Fixes:
2deb1acc653c
("isofs: fix access to unallocated memory when reading corrupted filesystem")
Link:
https://lore.kernel.org/r/20210118120455.118955-1-bianpan2016@163.com
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/dir.c
patch
|
blob
|
history
fs/isofs/namei.c
patch
|
blob
|
history
diff --git
a/fs/isofs/dir.c
b/fs/isofs/dir.c
index
f0fe641
..
b9e6a7e
100644
(file)
--- a/
fs/isofs/dir.c
+++ b/
fs/isofs/dir.c
@@
-152,6
+152,7
@@
static int do_isofs_readdir(struct inode *inode, struct file *file,
printk(KERN_NOTICE "iso9660: Corrupted directory entry"
" in block %lu of inode %lu\n", block,
inode->i_ino);
+ brelse(bh);
return -EIO;
}
diff --git
a/fs/isofs/namei.c
b/fs/isofs/namei.c
index
4027698
..
58f80e1
100644
(file)
--- a/
fs/isofs/namei.c
+++ b/
fs/isofs/namei.c
@@
-102,6
+102,7
@@
isofs_find_entry(struct inode *dir, struct dentry *dentry,
printk(KERN_NOTICE "iso9660: Corrupted directory entry"
" in block %lu of inode %lu\n", block,
dir->i_ino);
+ brelse(bh);
return 0;
}