lkml.org 
[lkml]   [2020]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.19 09/56] btrfs: inode: Verify inode mode to avoid NULL pointer dereference
Hi!


> @@ -6993,6 +7010,14 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
> extent_start = found_key.offset;
> if (found_type == BTRFS_FILE_EXTENT_REG ||
> found_type == BTRFS_FILE_EXTENT_PREALLOC) {
> + /* Only regular file could have regular/prealloc extent */
> + if (!S_ISREG(inode->vfs_inode.i_mode)) {
> + ret = -EUCLEAN;
> + btrfs_crit(fs_info,
> + "regular/prealloc extent found for non-regular inode %llu",
> + btrfs_ino(inode));
> + goto out;
> + }

This sets ret, but function returns err. Fix was already submitted.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-08-04 09:12    [W:0.290 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site