Received: by 2002:a05:7412:85a1:b0:e2:908c:2ebd with SMTP id n33csp66632rdh; Mon, 30 Oct 2023 14:06:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFomQYhisuU9qz9YICTaQi8BBrzI/efYuzqDp2iUFY/YNMk5JPr/LuK7vkx4qwpDlnKdZM2 X-Received: by 2002:a17:90a:cb09:b0:280:145d:510d with SMTP id z9-20020a17090acb0900b00280145d510dmr6516357pjt.31.1698699970689; Mon, 30 Oct 2023 14:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698699970; cv=none; d=google.com; s=arc-20160816; b=NoGfklhBs7n7N8H8iPDNnUmGoKQS3oBhOi6raxO548GMO2KIYy9YzGUi6WUgqPKPmI YE7UUQadGxer8mc8Hi341wINJ/jxNLfDJyeL18rZVP2MW6R2SbpKzMOVLl0ez+yDYqnX 3mPfhf8iXjLLoj7cDCqqe0W64yNl4k+es6ooF41MOD+H8SkJ9vKr41RJNxowntHTY5ZF tcxgMnyIoOIBl87wuYRZ4P6yT036fOLdlA5gZwJhEYKMl451QHlyDhGWwh+Yhj06u8gD YtJr5DukZDUp5GvhkV68M2DMAiXCU1lmzqWhkCTb0o+59js2UwrLDLBLKiY4B3v4T+lM t7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1JmURPcvLtSqLUUbFA7SrmnbERd26AC5lme3Qx7nOkM=; fh=BybAAQMQFHqylqeSqTAgCOrqeYW3XJmVFrJvhyJ5+KI=; b=tDb5Df3gEZkstewhZE2bAtvuXHSFLCIPKbFaCxSqzHFiGelAweIZPAzIWRHBTOD8k6 mrXUZm4d2DX6wniyV3ESJq64oj3NsvRluuS0JNYQceHCQLrKK/IhVtoJ9RhyNqMaFbTx tPXfbMvjfqbAcOXdPdt5CveTbIA+mcW3iR3+TLkbr+ahpQg2Xpou3DKH5jE1cwr2QD+e e2pKA60gEmbL5MSMO1CTdqLimz2yO+o5XXTgy7X/GtxM0EvphNdKOd6NGtWO1hpaI7qJ mpTC/mMPSry+uldusjJqfl6Va+5W/NBCP5VhLdcqPGpDHD3vJzBTR8oZGQIe8SyGRTxw Yh0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="T/cc2gdQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y6-20020a17090aca8600b002790c6760dbsi4785374pjt.70.2023.10.30.14.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 14:06:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="T/cc2gdQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B80708058A2A; Mon, 30 Oct 2023 14:06:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbjJ3VF4 (ORCPT + 99 others); Mon, 30 Oct 2023 17:05:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbjJ3VFy (ORCPT ); Mon, 30 Oct 2023 17:05:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B653CE1 for ; Mon, 30 Oct 2023 14:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698699916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1JmURPcvLtSqLUUbFA7SrmnbERd26AC5lme3Qx7nOkM=; b=T/cc2gdQ9Ogl+lNkXTZ4+MnJ/+1mcVUxPEUf8ftjlI/eaC6EoR3O5e072R9RT6+ZUOhngS Zy2U9EMqDQIYd1ioRSLCsv+BX76lhLwZkAwyDJTKF3IUpN9ZpA1rvJ5qCbyhxG4axrEdrO SIyR3OfJgEF4zfFvBZeDCKx0BIc2rkE= Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-n5jPfTScMcG6JlCWLTDk8A-1; Mon, 30 Oct 2023 17:05:13 -0400 X-MC-Unique: n5jPfTScMcG6JlCWLTDk8A-1 Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-5b7bf1c206fso2996241a12.2 for ; Mon, 30 Oct 2023 14:05:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698699912; x=1699304712; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1JmURPcvLtSqLUUbFA7SrmnbERd26AC5lme3Qx7nOkM=; b=E5v87nffN4aPLmyZDJ9PxciP5WYPfed0NZX9hElGizhIvNLcPOSlBDmxVK0/MOcMbd mC4NSfo/vq4aaaNKzJcDvH3NSgcVrwm48huVMpUoRuZCgbBNLD7GbqN4WgWR6zvRuVdl Rd8PLWhW4JrHFvrgbyzXGejmRfaOVz50O+zyE9zl2dQodIh8zZ55A8dfQ9jyG5fJih7m rl697YE4VzmOc9ZAK1Z29iF1LHIKV8wqqFA5NEA9R4AR29wU3ybk3TpKjU9BghO/9Tfj t9cP5FlYbaTF7A/CDQl/FiT8pV2QFD1ez4FCzHhSXDDg0UyHM4FIOQFbDYDRf/4lv5Qf SgoA== X-Gm-Message-State: AOJu0YzI1CkqUPsoAjLrz4rPC5nz3iJtHzm/GgHG5NWkZSa9EClNbE9E 3KrA/v8ZpJV9pW5aUSZc645zmB4QWitOxLE/8gbaXTWsKUFKLgiiEt6hxODFgsNiNUldqLEG7zW 7L/jhlYirv32vNZIqUu/x8KbSityTrF0wF7IduIs+ X-Received: by 2002:a17:902:bf44:b0:1ca:c490:8537 with SMTP id u4-20020a170902bf4400b001cac4908537mr8378144pls.14.1698699912579; Mon, 30 Oct 2023 14:05:12 -0700 (PDT) X-Received: by 2002:a17:902:bf44:b0:1ca:c490:8537 with SMTP id u4-20020a170902bf4400b001cac4908537mr8378130pls.14.1698699912248; Mon, 30 Oct 2023 14:05:12 -0700 (PDT) MIME-Version: 1.0 References: <0000000000000c44b0060760bd00@google.com> <000000000000c92c0d06082091ee@google.com> <20231025032133.GA1247614@ZenIV> In-Reply-To: <20231025032133.GA1247614@ZenIV> From: Andreas Gruenbacher Date: Mon, 30 Oct 2023 22:05:00 +0100 Message-ID: Subject: Re: [syzbot] [gfs2?] WARNING: suspicious RCU usage in gfs2_permission To: Al Viro Cc: syzbot , cluster-devel@redhat.com, gfs2@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, postmaster@duagon.onmicrosoft.com, rpeterso@redhat.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Mon, 30 Oct 2023 14:06:07 -0700 (PDT) Al, On Wed, Oct 25, 2023 at 5:29=E2=80=AFAM Al Viro w= rote: > On Fri, Oct 20, 2023 at 12:10:38AM -0700, syzbot wrote: > > syzbot has bisected this issue to: > > > > commit 0abd1557e21c617bd13fc18f7725fc6363c05913 > > Author: Al Viro > > Date: Mon Oct 2 02:33:44 2023 +0000 > > > > gfs2: fix an oops in gfs2_permission > > > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=3D10b21c33= 680000 > > start commit: 2dac75696c6d Add linux-next specific files for 20231018 > > git tree: linux-next > > final oops: https://syzkaller.appspot.com/x/report.txt?x=3D12b21c33= 680000 > > console output: https://syzkaller.appspot.com/x/log.txt?x=3D14b21c33680= 000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=3D6f8545e1ef7= a2b66 > > dashboard link: https://syzkaller.appspot.com/bug?extid=3D3e5130844b0c0= e2b4948 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=3D101c8d096= 80000 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=3D11a07475680= 000 > > > > Reported-by: syzbot+3e5130844b0c0e2b4948@syzkaller.appspotmail.com > > Fixes: 0abd1557e21c ("gfs2: fix an oops in gfs2_permission") > > > > For information about bisection process see: https://goo.gl/tpsmEJ#bise= ction > > Complaints about rcu_dereference() outside of rcu_read_lock(). > > We could replace that line with > if (mask & MAY_NOT_BLOCK) > gl =3D rcu_dereference(ip->i_gl); > else > gl =3D ip->i_gl; > or by any equivalent way to tell lockdep it ought to STFU. the following should do then, right? gl =3D rcu_dereference_check(ip->i_gl, !(mask & MAY_NOT_BLOCK)); > BTW, the amount of rcu_dereference_protected(..., true) is somewhat depre= ssing... > > Probably need to turn > ip->i_gl =3D NULL; > in the end of gfs2_evict_inode() into rcu_assign_pointer(ip->i_gl, NULL); That's what commit 0abd1557e21c6 does already so there's nothing to fix, ri= ght? > and transpose it with the previous line - > gfs2_glock_put_eventually(ip->i_gl); > > I don't think it really matters in this case, though - destruction of the= object > it used to point to is delayed in all cases. Matter of taste (and lockde= p > false positives)... I don't understand. What would lockdep complain about here? Thanks, Andreas