diff options
author | Jan Kara <jack@suse.cz> | 2020-09-21 15:08:50 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2020-09-22 12:23:15 +0200 |
commit | 4443390e08d34d5771ab444f601cf71b3c9634a4 (patch) | |
tree | ca3de0d548e4d63df130ae27ed67f0bd91519d0a /fs | |
parent | a7be300de800e755714c71103ae4a0d205e41e99 (diff) | |
download | linux-4443390e08d34d5771ab444f601cf71b3c9634a4.tar.gz linux-4443390e08d34d5771ab444f601cf71b3c9634a4.tar.bz2 linux-4443390e08d34d5771ab444f601cf71b3c9634a4.zip |
reiserfs: Initialize inode keys properly
reiserfs_read_locked_inode() didn't initialize key length properly. Use
_make_cpu_key() macro for key initialization so that all key member are
properly initialized.
CC: stable@vger.kernel.org
Reported-by: syzbot+d94d02749498bb7bab4b@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/reiserfs/inode.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index e3af44c61524..c76d563dec0e 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -1551,11 +1551,7 @@ void reiserfs_read_locked_inode(struct inode *inode, * set version 1, version 2 could be used too, because stat data * key is the same in both versions */ - key.version = KEY_FORMAT_3_5; - key.on_disk_key.k_dir_id = dirino; - key.on_disk_key.k_objectid = inode->i_ino; - key.on_disk_key.k_offset = 0; - key.on_disk_key.k_type = 0; + _make_cpu_key(&key, KEY_FORMAT_3_5, dirino, inode->i_ino, 0, 0, 3); /* look for the object's stat data */ retval = search_item(inode->i_sb, &key, &path_to_sd); |