From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Sean Christopherson <seanjc@google.com>,
Christian Brauner <brauner@kernel.org>
Cc: Ackerley Tng <ackerleytng@google.com>,
Chao Peng <chao.p.peng@linux.intel.com>,
Isaku Yamahata <isaku.yamahata@intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Michael Roth <michael.roth@amd.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Yu Zhang <yu.c.zhang@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the kvm-x86 tree
Date: Mon, 30 Oct 2023 13:48:06 +1100 [thread overview]
Message-ID: <20231030134806.24510492@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]
Hi all,
After merging the kvm-x86 tree, today's linux-next build (x86_64
allmodconfig) failed like this:
arch/x86/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_get_file':
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:280:35: error: passing argument 1 of 'get_file_rcu' from incompatible pointer type [-Werror=incompatible-pointer-types]
280 | if (file && !get_file_rcu(file))
| ^~~~
| |
| struct file *
In file included from include/linux/backing-dev.h:13,
from arch/x86/kvm/../../../virt/kvm/guest_memfd.c:2:
include/linux/fs.h:1046:47: note: expected 'struct file **' but argument is of type 'struct file *'
1046 | struct file *get_file_rcu(struct file __rcu **f);
| ~~~~~~~~~~~~~~~~~~~~^
Caused by commit
fcbef1e5e5d2 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory")
interacting with commit
0ede61d8589c ("file: convert to SLAB_TYPESAFE_BY_RCU")
from the vfs-brauner tree.
I have applied the following merg resolution patch:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 30 Oct 2023 13:35:38 +1100
Subject: [PATCH] fix up for "KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for
guest-specific backing memory"
interacting with "file: convert to SLAB_TYPESAFE_BY_RCU"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
virt/kvm/guest_memfd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
index 94bc478c26f3..7f62abe3df9e 100644
--- a/virt/kvm/guest_memfd.c
+++ b/virt/kvm/guest_memfd.c
@@ -276,9 +276,7 @@ static struct file *kvm_gmem_get_file(struct kvm_memory_slot *slot)
rcu_read_lock();
- file = rcu_dereference(slot->gmem.file);
- if (file && !get_file_rcu(file))
- file = NULL;
+ file = get_file_rcu(&slot->gmem.file);
rcu_read_unlock();
--
2.40.1
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2023-10-30 2:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 2:48 Stephen Rothwell [this message]
2023-10-30 10:05 ` linux-next: build failure after merge of the kvm-x86 tree Christian Brauner
2023-10-30 11:27 ` Paolo Bonzini
2023-10-30 20:37 ` Stephen Rothwell
2023-10-30 21:05 ` Sean Christopherson
2023-10-30 21:10 ` Stephen Rothwell
2023-10-31 13:42 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2023-04-11 4:00 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231030134806.24510492@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=ackerleytng@google.com \
--cc=brauner@kernel.org \
--cc=chao.p.peng@linux.intel.com \
--cc=isaku.yamahata@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=yu.c.zhang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).