From patchwork Wed Feb 28 21:46:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 208039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a1a:b0:17b:cd04:e0c6 with SMTP id 26csp212650rwa; Wed, 28 Feb 2024 13:47:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVrRVHuVt3kcWmqqK7QWV48x142NLk6aHUYmXPXhx0r05iCWPa/zDh0wflEnnSdaCPCSUYp3+F8+jrpUOd+GLCzUr6Bdw== X-Google-Smtp-Source: AGHT+IHK6smloaytgnn8fEHTD1yaKgEEDavylZFR9KC/DrQHw3BpKf+0Goj+PNpQag/g7yQAkr5b X-Received: by 2002:a05:6214:aab:b0:690:1e55:6df7 with SMTP id ew11-20020a0562140aab00b006901e556df7mr333874qvb.25.1709156854395; Wed, 28 Feb 2024 13:47:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709156854; cv=pass; d=google.com; s=arc-20160816; b=iEB0ficbtC4GSTq9CXFGu64QipsJL3+yM6vqFp6PeLbpY0FH82k+rca282IM+pVk8f 0LcFMCsuF81OVFXZ1l3/u2T2JLXUPSjzciRtshOrdAhzp8E0Dm4EUqqqlJ2hM4hT2eFS qYjUlvrSMkEKW+Y5UOMXU887jGCTH7WpSs8D451ahFMX6TJBfIMtwKL0csE+z0Kikw5p SsUqXSlqrgc6Qd1f0hlwrnqpZR6rJ7QTtL0IK9cjTh2BCmcSR9VoE8wBrvHZSREl9G0t Dfd8ni/+xc5990vyDaiA38fvD1loMK7UyCQ55bb2kAIIAfTvPpJx2MQz2cSw4K1+IrBF 5rpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=jCcKhJayF3qKC+MWOoovXcTl4UvkiKF5ftEDCyIL/VI=; fh=3u1qg4IRDmwhRVE25WGt9vWd4dav0gyztZLirCly8NM=; b=lD49M1IkU3JfsRRJ7Wo7kyY7zn0oYxWQpHE4u3hKX8i566NHqNZH8P1D6fjmObhf49 uUmZTt1Yi8kkwAXWdFvRmptAKj/Zt3LZyL7Tw5fIkLE2fzZKz9LpSYaUyeCQ5T5YxJwi IeODNZlLcI1sU+teHksqV/U+IrkrcJOpgMODjDUbizwGq1nmfsCjrY76R6Ag0RXD1vnI QfXA+iAb6InOsP6yXW610UC+HndVHxe9GZhex7uBJP7TiLhyH2xVzJ3s8cyB4GPBXTfA WLWKozpjdBd52ojTVugibBaYnu9IabTCdIOfFtUD9SUoCfpazJQcmkPZ2HGN8JiECqNR ReTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBLT9KkY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85741-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85741-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pg9-20020a0562144a0900b006903eba5044si22754qvb.112.2024.02.28.13.47.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 13:47:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85741-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBLT9KkY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85741-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85741-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2CE1E1C22247 for ; Wed, 28 Feb 2024 21:47:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 558A77290E; Wed, 28 Feb 2024 21:47:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NBLT9KkY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A04D13FB97; Wed, 28 Feb 2024 21:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709156835; cv=none; b=lrdt9zr/b56WOXfs65G+cw1+Cczg7Jzq1qER/bxb54T3Ea7LrwxPBQh001hcy2D3iMie7zji6o1NGLAQ+ugIQzgdmVSHkaUbQJg+Vs11me0LIX3647G7x/OXeCmFZkYrrfGS6aNCI1ln+bojMv3zwvEj3BK56hyEtZ+wvOOx7ic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709156835; c=relaxed/simple; bh=sxZkuOb7q4tDGVwfQR84w+qL7n5xeOeJqnEC5GcENck=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tBlJc7lCL1eFlOraO1pY/2/E2c582m/nhR1ymZxn89tgCImcq4XkBnTmzHU2eP2LPlsBM4TR86mduuLQaCe7+0vCoDmx3/ZqMk0XiFwdT8xFy3EHMu8WKigyb+MzN+lnu1bZbRuyGQapD/fmPri/xSw6PObx6o69PoAxBMPKIbM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NBLT9KkY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DACC0C433F1; Wed, 28 Feb 2024 21:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709156835; bh=sxZkuOb7q4tDGVwfQR84w+qL7n5xeOeJqnEC5GcENck=; h=From:To:Cc:Subject:Date:From; b=NBLT9KkYzdKS7QSnvZ7KA72L3EpUiVoxlKlVr2PbI6c1Ufti5h2DT5m8VvAKzchcV u5bK2BpSOkOsH4pn7khd/2M4ASoElLqATSSx0MCTGgWekJ0+bsC4ecbtBCLHp69JiD vktpr9Gt00Ba2mBXfO4M0a/0TZRemDSmMk082t1lDNrZPOOQRHvYvkVQHAPG2JVqFo 11Z63fk2hWSazvSjPl5/nymWcwCmtaWHbdhHE+m4ucNoh0214aaY2DNigqLUAvtoa9 /C86MauACM1Kh6yO+ycdxrE7icjc1EF+lmYWXtZMSs0dQs2XM9vaCoTcPxJQiT9bxc VUDkEmADftTwg== From: Arnd Bergmann To: Vivek Goyal , Stefan Hajnoczi , Miklos Szeredi Cc: Arnd Bergmann , Dan Williams , Jane Chu , Mathieu Desnoyers , virtualization@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] virtiofs: don't mark virtio_fs_sysfs_exit as __exit Date: Wed, 28 Feb 2024 22:46:59 +0100 Message-Id: <20240228214708.611460-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792180857847687684 X-GMAIL-MSGID: 1792180857847687684 From: Arnd Bergmann Calling an __exit function from an __init function is not allowed and will result in undefined behavior when the code is built-in: WARNING: modpost: vmlinux: section mismatch in reference: virtio_fs_init+0x50 (section: .init.text) -> virtio_fs_sysfs_exit (section: .exit.text) Remove the incorrect annotation. Fixes: a8f62f50b4e4 ("virtiofs: export filesystem tags through sysfs") Signed-off-by: Arnd Bergmann --- fs/fuse/virtio_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 3a7dd48b534f..36d87dd3cb48 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -1595,7 +1595,7 @@ static int __init virtio_fs_sysfs_init(void) return 0; } -static void __exit virtio_fs_sysfs_exit(void) +static void virtio_fs_sysfs_exit(void) { kset_unregister(virtio_fs_kset); virtio_fs_kset = NULL;