Skip to content

Commit d0e8888

Browse files
committed
Merge tag 'erofs-for-6.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs fixes from Gao Xiang: "The main one is a KMSAN fix which addresses an issue introduced in this cycle so it'd be much better to fix before releasing, and the remaining one fixes VMA alignment for THP. Summary: - Fix a KMSAN uninit-value issue triggered by a crafted image - Fix VMA alignment for memory mapped files on THP" * tag 'erofs-for-6.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: apply proper VMA alignment for memory mapped files on THP erofs: fix uninitialized page cache reported by KMSAN
2 parents df47935 + 4127cae commit d0e8888

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

fs/erofs/data.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,5 +447,6 @@ const struct file_operations erofs_file_fops = {
447447
.llseek = generic_file_llseek,
448448
.read_iter = erofs_file_read_iter,
449449
.mmap = erofs_file_mmap,
450+
.get_unmapped_area = thp_get_unmapped_area,
450451
.splice_read = filemap_splice_read,
451452
};

fs/erofs/decompressor.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ static int z_erofs_transform_plain(struct z_erofs_decompress_req *rq,
323323
unsigned int cur = 0, ni = 0, no, pi, po, insz, cnt;
324324
u8 *kin;
325325

326-
DBG_BUGON(rq->outputsize > rq->inputsize);
326+
if (rq->outputsize > rq->inputsize)
327+
return -EOPNOTSUPP;
327328
if (rq->alg == Z_EROFS_COMPRESSION_INTERLACED) {
328329
cur = bs - (rq->pageofs_out & (bs - 1));
329330
pi = (rq->pageofs_in + rq->inputsize - cur) & ~PAGE_MASK;

0 commit comments

Comments
 (0)