Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1140811pxu; Fri, 16 Oct 2020 05:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYyK195w1S13YuFhRtCceEpfjo6B9pU0a9I7swsIOLmqy28tDx8JFoKD2rGhj7hRqvoLjL X-Received: by 2002:a05:6402:a4f:: with SMTP id bt15mr3532146edb.345.1602849964208; Fri, 16 Oct 2020 05:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602849964; cv=none; d=google.com; s=arc-20160816; b=cojjMahL79qdCCalORzmLau4vI95YGa1Ue5wnI3NlEUXSLNC4W7ES82hWcnT2gBF2q YPAE83FAjuqgYl1iHj19KAP8A+HKqz1c/qE/XVeu1V5i+HE2e9cAuwm7JSZIVP9ePBG3 d1DOdlzeQkU+Sfe1Q9pRw+GM8iuo2SpEONXkaDOjwB1Gmz7A2kNnrH7aHZ695p4IFnMa cjo4U2WRWPMqVmmbiL7v24j3Y8n9L06qeLnCM5NklkV1AgR4YS2Jxc4opI9IJoiiAcyA cj/AZeP6X61EAsDaG5qdFnMFq7whGrP8fIBH6YJhzEg8etLZJcDrN1tJWbZub6942jsO YRAg== 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=OsZD91VT2h1MTqa5nl8cOX6h4w/kp/NIeHEIHoLWNTw3inhhyPWcKc3tjo2slMk2p4 WWSnk4dL/xMN8esLIyNxRH1T1G4+K02G82Iih5sYLWTUJF5WLVSDRoer4GAy7Vdv8lQS RVdGbZwXXE2f80+CYGhhHit420raYalgVGJU73HsjzuzmoRDvBwBPiZH57NxhDsgSIOR Yx2RRQMPXDiA80nQ2XVa+3sq64HaCxfE425Ps8B7XF7xM0J1aXlRWsQ4rZDSpkdBRydt VGZ1TC+11h4sOuwe950jT2iQKZp4JsMKg1sNlMfF1fx4PdX7zakSLJPyADSiKoiuBTWb pD+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WRo+5i4m; 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 pv4si1489335ejb.4.2020.10.16.05.05.36; Fri, 16 Oct 2020 05:06:04 -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=WRo+5i4m; 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 S2405327AbgJPJGy (ORCPT + 99 others); Fri, 16 Oct 2020 05:06:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:34978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405320AbgJPJGw (ORCPT ); Fri, 16 Oct 2020 05:06:52 -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 4BCBE20848; Fri, 16 Oct 2020 09:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602839211; bh=nJQ3OJhP3nQvj0m1UlC0a5K7IIXWDVG71TTpX6f38ZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WRo+5i4mrQXY5kMQuXpekFpV2+IB2ibGpLtpg7Vgkl8uEI0tfCGmcwvUKe9hCqKGq eIPlAwf0OSoIj5VX5wsPJrkcH2dhCIIKXL9X9RXOtLVVJeS/OWbXkh+8vCVpwLJrX6 8fLCENZAN39pvpXNpW1p69T+E7pujC6mOzXTf7Gw= 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.4 13/16] reiserfs: Initialize inode keys properly Date: Fri, 16 Oct 2020 11:07:06 +0200 Message-Id: <20201016090436.070115145@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016090435.423923738@linuxfoundation.org> References: <20201016090435.423923738@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);