Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1140781pxu; Fri, 16 Oct 2020 05:06:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJBGGqQ3qVDtuNj10ogKHuSeNjBzHY5HKMmp69CF+ULML8ZcZAINn/l6Ha788fJcYDKdp/ X-Received: by 2002:a17:906:aad5:: with SMTP id kt21mr3300569ejb.5.1602849962141; Fri, 16 Oct 2020 05:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602849962; cv=none; d=google.com; s=arc-20160816; b=EZw2R+mrPnPp9dnBWTvZp3UC1croFTsKRb9Z+7QelS/xQ+932Bwj4b6RLj/t8dawyQ ClWPGt6vkOxBIL6vz56EVzrXUjcgOOVE++R8eLi9BNT3LMwEfvo0owZxhHY9A+IuKylk xDZDgjgUqfpPrgvNK5HZ9fv4rg/xbtR7AuQiQgpwgGhglImzczrEwvi0oWhlVMigRhsl MNoKa2+GsERw8UPFxHJxYgC1pONXxrMs1yNLgFS3uXuTJgkvmX5QgxStEfRkZEVvHJMn lNde4KQmbMMieWffs4AIAstMnjfkpfnIYKYwc0HTo4hspY1Nzxg5uvN0DComoRMhtQHJ ideA== 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=qfiF8rIR3ONATUrOLmSqcVNdLH5t1/kt3IwWPK8PkW0=; b=z99+h4goCzXy2/QDq/onPcuIDKYnHKiXK4kxAF/Xdo7Qz4r11wNKkmW5PjhXirOZVc jwOfq5s8Tyy5OHeTvHWIE/xT0+/QCY5zQ76N2STPaQM04AR6sbjZcWmk1cAgpQt4mLre 67LVMnZN5NCTRKYPY6OGwpw3AUX+R1Un8Bi3Z0kqmwvPc9fSIFs6zX7tDEpGclc2Jys/ DSixjdLhleJs7EbwIN+uFj2nPMLTDrRpcfcVVZfpqX+bfFU1U795WV0gwIRiH0DSNoTj IHYoC3iMNdLmX3XbntRXAm7u3444M335R6JZr70UaZgycTr8Vms+S5UovfVUTQAAactC zQvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VQLsdFyK; 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 ck9si1481171ejb.445.2020.10.16.05.05.33; Fri, 16 Oct 2020 05:06:02 -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=VQLsdFyK; 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 S2394934AbgJPJHv (ORCPT + 99 others); Fri, 16 Oct 2020 05:07:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:36056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394904AbgJPJHo (ORCPT ); Fri, 16 Oct 2020 05:07:44 -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 1550B20789; Fri, 16 Oct 2020 09:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602839263; bh=D5hUL4SWsMlrsqXDEX491/eYSiPleStMN00z+BVSyTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VQLsdFyKNsQyV2DxuNS3soNwTNyTqV3d8eJLCt8w9xxGF3MDo3Yf5D6CNQoJDOcHN IymdcxE+Q5XI6zWXh02AtmU0SLL42+VAXyE4giMQElOSFOZKWwv3wm6tuKoB0Tsmr6 khngWMQ44cUfAyiAeSVvqI1Ts2sGlUl+8Cf1JXiM= 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.9 14/16] reiserfs: Initialize inode keys properly Date: Fri, 16 Oct 2020 11:07:18 +0200 Message-Id: <20201016090437.917062205@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016090437.205626543@linuxfoundation.org> References: <20201016090437.205626543@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 @@ -1554,11 +1554,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);