Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1164866pxu; Fri, 16 Oct 2020 05:40:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFEIU2pqncn5iJRSk/+E7m7Vo9kPvt2ZzBRiMyojhKQ7ntJO6fpVpVbYzZNFrsbmOH6pG9 X-Received: by 2002:a17:906:cca9:: with SMTP id or9mr3359961ejb.451.1602852012927; Fri, 16 Oct 2020 05:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602852012; cv=none; d=google.com; s=arc-20160816; b=bKEvtLtSKMCVmoGwjuIGNNKhHam89XcXnezfbcvvRTqo2bomalgmLo1kYpjYeO4ajT CMvL0hd8scaDW0qswW811NgNHsC0UNogNtDxZ0Hq1ROehxk/z/OfTC82ZIAZu666uvQA QTSYsY91sXQCEl8h5d4DcS7EQPBtyQHFMriFMmGNoOJFL2hkRmLGOJEE7qzByUmerwqH Y2GbQHeuK2v9XXxs8F+46ihmE33Ez2E0oCO7Tx1f7HjtIsPOFmODwNLIB7/gHkRPAbLR 7aw7bnJyWVXzxfjYJneBlCa9T3QhjDohDh+Kw6ByCQrgMayKsiBA/ZA09CnXYLpDlhDJ pC1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qYLjrQQTwrbyJA3Xein7cBvPOa1E9Ax2T5F4WbpaJrk=; b=bb4fh/l5TIkO6XyHyIfC1yS3qeilVRGt9/reEjkhDKDlQEiqcn6wB8/XEF79/Xsckc wgCyghL8fzjnmKlBmadVaR2eHjhoVIPAQHyLL8o6WgfFceoR68JWzbMcMTq12t8GUbN1 vp85Eg9atPSpeG2NXiRCBUvmFJ/S58OT+Gujz72KkYmuI3skkfHIB3Vye5NVKp/DgEEz Gh7aclduQOxv12cPJa8WHTzYM9Nt5UbPJxgyFpQGhnVH9sJg6d7zG4mWzgkwn+iD0p0d Q1mwMfHl0/cCEYfbH+NsoK8TOQ03O3cK/tUivMyPkWZZjvXUgfVeWj1kLpGm5Ff9EyS2 +ZAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="qd1ssZ/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn1si1649152edb.319.2020.10.16.05.39.50; Fri, 16 Oct 2020 05:40:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="qd1ssZ/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394656AbgJPJOq (ORCPT + 99 others); Fri, 16 Oct 2020 05:14:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:38838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394657AbgJPJJx (ORCPT ); Fri, 16 Oct 2020 05:09:53 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 841772145D; Fri, 16 Oct 2020 09:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602839381; bh=nJQ3OJhP3nQvj0m1UlC0a5K7IIXWDVG71TTpX6f38ZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qd1ssZ/uYLCiWpVtH/nE5gCJqe04CSci2XSQdTT0TCn6HpwI1Hc/Uep+3d2iPqSvU 1vE2i9fYF619ARvTUf3jnLaeVdZknC+64S7d+6HjCCpPMJ018AcLOaBeTdQBnIuZ7N FKId8rPjlry2ZRNx5iUSxi/Etv7IH208+QesQ3p8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+d94d02749498bb7bab4b@syzkaller.appspotmail.com, Jan Kara Subject: [PATCH 4.19 17/21] reiserfs: Initialize inode keys properly Date: Fri, 16 Oct 2020 11:07:36 +0200 Message-Id: <20201016090438.140079234@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016090437.301376476@linuxfoundation.org> References: <20201016090437.301376476@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kara commit 4443390e08d34d5771ab444f601cf71b3c9634a4 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- fs/reiserfs/inode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -1553,11 +1553,7 @@ void reiserfs_read_locked_inode(struct i * 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);