Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1593059rdb; Sun, 19 Nov 2023 02:27:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUXK6KWmiasUe1+mlriJfpeX31qV6CN2PvZO31DCayuupb+IYBiQRMvI50GoPS3jUltz1y X-Received: by 2002:a17:902:eb8f:b0:1cc:237c:75d6 with SMTP id q15-20020a170902eb8f00b001cc237c75d6mr3470764plg.67.1700389632003; Sun, 19 Nov 2023 02:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700389631; cv=none; d=google.com; s=arc-20160816; b=F1NegM1nVzW51Zz7ppGEydS5Phjz0n+G7dp07mEivLAr/4G1v02xbKGXsr3g3dDc23 jC3N9b0oIwLMEjKWXu0SGkheDfSnTlJdN6/olIw54QIIs8Bb3MUBdh7Mmn+sl0iYc9uy SgqCKj9YSbfI3XIJKxsrNYLrFj4Zp1PEzXtnR+8DaiN+5Rs3hcdayR4oXoSpe+1/H7Qd aGPwJvhIJncvqoaC3bBgLZQ8WL6obqjpDtzL2m7bnfGoPGBz8WNLWebHsz6wxyZTIt50 ZxJ4ExemKFoY9PcgkokInEiPFvarwEKW2SyY8aGGUR6GA1Q+K5EvfB+l6YfoLHjQFCbd 5HeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:feedback-id:dkim-signature :dkim-signature; bh=vLP7CS3hWF8TwbCJyhaj4FZ2G7iGG7Hui2jFMmmwK8g=; fh=Goc22Se4jER0VNO/IvJX1ii/wKmMBQgKUmlz8MDml/Q=; b=fRSPNdzyHRN4N3WKXxEQXrltBYvPV76U5HXMKkZgPu9O8ksZbq+VMaZTdkuKHX7C02 6CXcsE3G6ffqjk78JCzeEEPBZJ/HZ6g1cYssdXeecjzLYb1gUsKMi2g0ynH9SgrKyS5O z48RAM198yiP/K7cQNNqbCWhABNRBvdoPJIfID0rIlXKnI51VLBxC3DDAsd4Yi73A8Ie DRCzgnL/4dpWoYVSxEjjpEt5IcWZMSsk6dwffuQxisYd8X3D/QMfIAUC9gX1VEeltFXw mLbTk13XZ19/O0aGD5N789nzEQ7xK+FsedSECRQKWfq4eKIiUPZyan+lYh7LtgCKxYES Q8kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm3 header.b=j4uQs60l; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=LPX2aj4c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h20-20020a170902f7d400b001c610ae885bsi5638040plw.59.2023.11.19.02.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 02:27:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@themaw.net header.s=fm3 header.b=j4uQs60l; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=LPX2aj4c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D5CCB80A9922; Sun, 19 Nov 2023 02:27:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230159AbjKSKYB (ORCPT + 99 others); Sun, 19 Nov 2023 05:24:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjKSKYA (ORCPT ); Sun, 19 Nov 2023 05:24:00 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFFCB6; Sun, 19 Nov 2023 02:23:56 -0800 (PST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 99DCD320090B; Sun, 19 Nov 2023 05:23:52 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 19 Nov 2023 05:23:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700389432; x=1700475832; bh=vLP7CS3hWF8TwbCJyhaj4FZ2G7iGG7Hui2j FMmmwK8g=; b=j4uQs60l0zMpMfS3qEPNTEQqwjJ7ZLq/IAyYtjCvka7C2g1EDq6 FZfWAE/VqiZ5x69XI4WxlZNZextAPyYWgWr/XF81q1AQVyjstdcwO4irq67zRQV4 /VfEJf6uvLMHUO33ehrYXLMj8sHnde/dELOzElaFLndzhx6++f2+jvuDJJBN4Vr4 HcJJa+vPoMF0xtda7xkv1p926FjcVAKmVhtbL8aIYS4Y81ukZHDDIt/e5mYMpgWo g1ApCTnU4+5fl1w9zz0vNLhrOGeVe2vD4ktLkuGxdSLHXaHrb38GgyHOnTB+KobB B8kS3Gmtz+x+TgfH4WTVHqZQB6pvBqQDFoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700389432; x=1700475832; bh=vLP7CS3hWF8TwbCJyhaj4FZ2G7iGG7Hui2j FMmmwK8g=; b=LPX2aj4cUM/qmhxv1OgVAJjEXlsnxJPYsDcd9bUo1aGdfcj/nvh 1llILe/43VSF5U3UVyQ9lSQemSEWlgvRwzQ3WZdN+kIAwJoTbZnb5vYTTFLC2GwL GzVGCquxE7uPNHLaEMCQaHvQzRY5Ts1Pa3VGG6CwWn0wWp6YCf4ATA3POGiYaZ6K x0MzwDZdx0uMg9/cgUPe/2Y3ZcuLhqEmDLOahRW0tA4lr9LrQ2WldFJYlpW2eTGh MfLH1utxibCUS++vuGy5cSZMMkPt4OXSJbas3LO7D1ohePqCovu0ya6BGHi0bz2U VbceYRdAmLaeCKU8tYfgkMkyBofOY0Dt7UA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeggedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfhffuvfevfhgjtgfgsehtjeertddtfeejnecuhfhrohhmpefkrghn ucfmvghnthcuoehrrghvvghnsehthhgvmhgrfidrnhgvtheqnecuggftrfgrthhtvghrnh epvddvudfhkeelheefueefleffgfffffefleejheduvdeutdekleevheekieefteegnecu ffhomhgrihhnpehgihhtqdhstghmrdgtohhmpdhgihhthhhusgdrtghomhdpkhgvrhhnvg hlrdhorhhgpddtuddrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehrrghvvghnsehthhgvmhgrfidrnhgvth X-ME-Proxy: Feedback-ID: i31e841b0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Nov 2023 05:23:47 -0500 (EST) Message-ID: <9ad32b90-b03b-f493-14fb-ce31a1409774@themaw.net> Date: Sun, 19 Nov 2023 18:23:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 From: Ian Kent Subject: [PATCH] autofs: add: new_inode check in autofs_fill_super() To: kernel test robot , Al Viro , Christian Brauner Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Bill O'Donnell , Kernel Mailing List , autofs mailing list , linux-fsdevel , syzbot+662f87a8ef490f45fa64@syzkaller.appspotmail.com References: <20231116000746.7359-1-raven@themaw.net> <202311161909.KHau6jEj-lkp@intel.com> Content-Language: en-US In-Reply-To: <202311161909.KHau6jEj-lkp@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 19 Nov 2023 02:27:11 -0800 (PST) On 16/11/23 19:23, kernel test robot wrote: > Hi Ian, > > kernel test robot noticed the following build warnings: Crikey, how did this compile ... I think I need to just send a replacement patch. Ian > [auto build test WARNING on brauner-vfs/vfs.all] > [also build test WARNING on linus/master v6.7-rc1 next-20231116] > [cannot apply to vfs-idmapping/for-next] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url:https://github.com/intel-lab-lkp/linux/commits/Ian-Kent/autofs-add-new_inode-check-in-autofs_fill_super/20231116-081017 > base:https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all > patch link:https://lore.kernel.org/r/20231116000746.7359-1-raven%40themaw.net > patch subject: [PATCH] autofs: add: new_inode check in autofs_fill_super() > config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20231116/202311161909.KHau6jEj-lkp@intel.com/config) > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231116/202311161909.KHau6jEj-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes:https://lore.kernel.org/oe-kbuild-all/202311161909.KHau6jEj-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > fs/autofs/inode.c:330:8: error: expected identifier > goto -ENOMEM; > ^ >>> fs/autofs/inode.c:330:8: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] > fs/autofs/inode.c:329:2: note: previous statement is here > if (!ino) > ^ > fs/autofs/inode.c:349:4: error: use of undeclared identifier 'ret' > ret = invalf(fc, "Could not find process group %d", > ^ > fs/autofs/inode.c:351:11: error: use of undeclared identifier 'ret' > return ret; > ^ >>> fs/autofs/inode.c:330:8: warning: expression result unused [-Wunused-value] > goto -ENOMEM; > ^~~~~~~ > 2 warnings and 3 errors generated. > > > vim +/if +330 fs/autofs/inode.c > > 306 > 307 static int autofs_fill_super(struct super_block *s, struct fs_context *fc) > 308 { > 309 struct autofs_fs_context *ctx = fc->fs_private; > 310 struct autofs_sb_info *sbi = s->s_fs_info; > 311 struct inode *root_inode; > 312 struct dentry *root; > 313 struct autofs_info *ino; > 314 > 315 pr_debug("starting up, sbi = %p\n", sbi); > 316 > 317 sbi->sb = s; > 318 s->s_blocksize = 1024; > 319 s->s_blocksize_bits = 10; > 320 s->s_magic = AUTOFS_SUPER_MAGIC; > 321 s->s_op = &autofs_sops; > 322 s->s_d_op = &autofs_dentry_operations; > 323 s->s_time_gran = 1; > 324 > 325 /* > 326 * Get the root inode and dentry, but defer checking for errors. > 327 */ > 328 ino = autofs_new_ino(sbi); > 329 if (!ino) > > 330 goto -ENOMEM; > 331 > 332 root_inode = autofs_get_inode(s, S_IFDIR | 0755); > 333 if (root_inode) { > 334 root_inode->i_uid = ctx->uid; > 335 root_inode->i_gid = ctx->gid; > 336 root_inode->i_fop = &autofs_root_operations; > 337 root_inode->i_op = &autofs_dir_inode_operations; > 338 } > 339 s->s_root = d_make_root(root_inode); > 340 if (unlikely(!s->s_root)) { > 341 autofs_free_ino(ino); > 342 return -ENOMEM; > 343 } > 344 s->s_root->d_fsdata = ino; > 345 > 346 if (ctx->pgrp_set) { > 347 sbi->oz_pgrp = find_get_pid(ctx->pgrp); > 348 if (!sbi->oz_pgrp) { > 349 ret = invalf(fc, "Could not find process group %d", > 350 ctx->pgrp); > 351 return ret; > 352 } > 353 } else { > 354 sbi->oz_pgrp = get_task_pid(current, PIDTYPE_PGID); > 355 } > 356 > 357 if (autofs_type_trigger(sbi->type)) > 358 /* s->s_root won't be contended so there's little to > 359 * be gained by not taking the d_lock when setting > 360 * d_flags, even when a lot mounts are being done. > 361 */ > 362 managed_dentry_set_managed(s->s_root); > 363 > 364 pr_debug("pipe fd = %d, pgrp = %u\n", > 365 sbi->pipefd, pid_nr(sbi->oz_pgrp)); > 366 > 367 sbi->flags &= ~AUTOFS_SBI_CATATONIC; > 368 return 0; > 369 } > 370 >