Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2955364rdb; Tue, 13 Feb 2024 02:22:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGEvJ7d0lgC5d2pQ6Q6PYsvj8gH8/Vbb/1YWr2OPNADWhbdJqY7grhElPIQldaWU0045hOBRKJR9YR6s7pyNKRp4HarSdOy8w/KR6dDw== X-Google-Smtp-Source: AGHT+IHeAJFrFOfmhqGqmqNgN6iExX52ulcueaslLbjD35nounivHaigZfUBbND+3f3eW4zQrVmd X-Received: by 2002:a05:6512:3085:b0:511:9ba9:b883 with SMTP id z5-20020a056512308500b005119ba9b883mr924556lfd.44.1707819740673; Tue, 13 Feb 2024 02:22:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707819740; cv=pass; d=google.com; s=arc-20160816; b=WD0mOwKnRL6wm1glnH96DpcdHziDJjOY+sPpeuiOzxSOaUT4o877gsXj/nxX2E7acH 9llO4OhtSV+vMnj/EvI7Wmd0MEDkHW5vWiLsdj4GigNmSdfeQmX2WN0GdBwdruC3GaUb tU3ZZB2xZZS5XUaiJVovDle3LHbixJ57HSIcIUNGVI3hD+k8D2GhbO8faSW8D43vxB+f dxaeFyocQv1NukwX/qvDWoVjnwT/HLEosx/yLpOZSb2hbMPyWZtB9FH7loBwVg+tiQbi 6mqXGfCB30FWDT+pUBXO/e0VEZK1JSKnyR5ayIurPov3kcBZTdR0FxYsYOAvlDSQtNNr zREg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=d904vDzjZZGghzwLazg4bY2SmZjBYPoNaByuYf/AuFU=; fh=kNLblmytXzhN9q7OCXVOpTfhKklG41pVX+tcIgDXIf8=; b=zLOn5VS3MUmT3AMug6m5bIslVXIzKfupksBlREYUah/7W9UsIYa4irPtxgFd40WBzw VofCnbvbYIihgedm67yzL9wXYqClvQ/WslzHZXDNXw1WlpkNWvdNqxLDmS1U4nQJvby7 mns/PITpdbIe8wKuv+DB4Nl0+/PoTKHZ3cbDeVI0M6aW7mJBPM+CVaF60m4GRiySglmt 43RV8xgqLtqLU5F5SxfyfVC9IOgiq9lWDCAWY+gRbSNQGKBn9h/oVb47hpqGTt8ZDd7U ev+YWVAHvSVA9Ck7y+oLsoNMD66ny6RWQX49yOdtkjzBVDi+haCNuqospRoWSFE2CAHW TXCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3Iu070Ng; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=jY2mDelz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3Iu070Ng; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-63334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63334-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWHonftSgcp+fLHZ6+OqxrpPOIIems7LVox4Nbah/z4eQcDd367Nnv/+KERSUzavVhihwYmfHwh+KT/5oN4JovxQaekhrwYwa5DGw+iWg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id by20-20020a170906a2d400b00a3ce86a105asi894116ejb.272.2024.02.13.02.22.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:22:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3Iu070Ng; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=jY2mDelz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3Iu070Ng; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-63334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63334-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C932C1F22D0A for ; Tue, 13 Feb 2024 10:21:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD5AD22612; Tue, 13 Feb 2024 10:21:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="3Iu070Ng"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="jY2mDelz"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="3Iu070Ng"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="jY2mDelz" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35A211C687 for ; Tue, 13 Feb 2024 10:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819703; cv=none; b=kwJWfpRYFq9w/9fw+31M5BVwy7vfuyhkc0xriTYs4ZTZ1PNjcITM5j8UhUjfZ9+7rnscAPMi4OM11S8YkFR4tAFPUBohBDxmjxFfd2jaVdokKn7tACnQAR0D+x3kjc75qQTgVvWTbsHFL3DSgH+sZxEMDt9D7WSgAnE67f+hGfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819703; c=relaxed/simple; bh=yrkZFP3WpHNZBu/aZMP122MxWKi0gmDYH7JNg76nhsA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z4SPTcjVgU9uoKfyfkDQm5lJpNphqkn6XZTnc3RDdY8aULoUt0FIyoyRRtRsvnL8ljjkK22NdPRsMFzmwpX9FCZmZdifBhFCGgPiDsGbnjl9Nn3lvmOU9/gnWzOzqvliR4xAP52KNFYBD1H5+wpHmMk1FzpNUUNnWEFhpL6ns3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=3Iu070Ng; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=jY2mDelz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=3Iu070Ng; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=jY2mDelz; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 60D9B1FC85; Tue, 13 Feb 2024 10:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1707819700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d904vDzjZZGghzwLazg4bY2SmZjBYPoNaByuYf/AuFU=; b=3Iu070NgktDu1qFqpaURuLaZz7E+v6RKbIcQGE1lTasnbrBCQAsICiWaloTog5EGbQ5ndA F+550BERD5ZKH/e0EinGW0SuekvfskAIrRMYshXNZbmzk+MeOtcGtkoTEdW2lEsAU9CjFP eIUG79EZvgijsRQssovfsSkvkI7d1Lc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1707819700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d904vDzjZZGghzwLazg4bY2SmZjBYPoNaByuYf/AuFU=; b=jY2mDelz9xhVj0KZ/UbSX0StMIQwUdIry0onQvXSnKV5BsYd4aCIrgnQgl2Yt8HmsByk8Y X7RLlbSUoiThRzCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1707819700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d904vDzjZZGghzwLazg4bY2SmZjBYPoNaByuYf/AuFU=; b=3Iu070NgktDu1qFqpaURuLaZz7E+v6RKbIcQGE1lTasnbrBCQAsICiWaloTog5EGbQ5ndA F+550BERD5ZKH/e0EinGW0SuekvfskAIrRMYshXNZbmzk+MeOtcGtkoTEdW2lEsAU9CjFP eIUG79EZvgijsRQssovfsSkvkI7d1Lc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1707819700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d904vDzjZZGghzwLazg4bY2SmZjBYPoNaByuYf/AuFU=; b=jY2mDelz9xhVj0KZ/UbSX0StMIQwUdIry0onQvXSnKV5BsYd4aCIrgnQgl2Yt8HmsByk8Y X7RLlbSUoiThRzCA== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 53C151329E; Tue, 13 Feb 2024 10:21:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id P6ovFLRCy2VwMAAAn2gu4w (envelope-from ); Tue, 13 Feb 2024 10:21:40 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id EF03BA0809; Tue, 13 Feb 2024 11:21:39 +0100 (CET) Date: Tue, 13 Feb 2024 11:21:39 +0100 From: Jan Kara To: Arnd Bergmann Cc: Jan Kara , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH] quota: avoid printing an uninitialized blk number Message-ID: <20240213102139.gnfh5sq24rwu7wnp@quack3> References: <20240213101733.461544-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240213101733.461544-1-arnd@kernel.org> Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.34 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[arndb.de:email,suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.06)[61.28%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: 0.34 On Tue 13-02-24 11:17:28, Arnd Bergmann wrote: > From: Arnd Bergmann > > The error path of find_tree_dqentry() now prints a variable that is > never initialized: > > fs/quota/quota_tree.c:674:8: error: variable 'blk' is uninitialized when used here [-Werror,-Wuninitialized] > blk); > ^~~ > include/linux/quotaops.h:34:41: note: expanded from macro 'quota_error' > __quota_error((sb), __func__, fmt , ## args) > ^~~~ > > Move the calculation of the block number slightly up to make it > show a sensible number. > > Fixes: 223bfb57631b ("quota: Detect loops in quota tree") > Signed-off-by: Arnd Bergmann Arnd, this should be fixed in my tree as of yesterday and I can see that you've even based your patch on a fixed kernel :) Honza > --- > fs/quota/quota_tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c > index afceef3ddfaa..05ae39f9b1ac 100644 > --- a/fs/quota/quota_tree.c > +++ b/fs/quota/quota_tree.c > @@ -669,13 +669,13 @@ static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, > if (!buf) > return -ENOMEM; > ret = read_blk(info, blks[depth], buf); > + blk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); > if (ret < 0) { > quota_error(dquot->dq_sb, "Can't read quota tree block %u", > blks[depth]); > goto out_buf; > } > ret = 0; > - blk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); > if (!blk) /* No reference? */ > goto out_buf; > ret = do_check_range(dquot->dq_sb, "block", blk, QT_TREEOFF, > -- > 2.39.2 > -- Jan Kara SUSE Labs, CR