Only expose compat ioctl when CONFIG_COMPAT
PATCH 1/1 Only expose compat ioctl when CONFIG_COMPAT
Jan spotted that we shouldn't use a function only available when CONFIG_COMPAT in a struct that's available without the config option.
So since my patch introduces that, let's just not export the compat ioctl function when CONFIG_COMPAT is not set, so we don't break then.
--- virt/kvm/kvm_main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
virt/kvm/kvm_main.c +2 -0
@@ -1623,7 +1623,9 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma)static struct file_operations kvm_vm_fops = { .release = kvm_vm_release, .unlocked_ioctl = kvm_vm_ioctl, +#ifdef CONFIG_COMPAT .compat_ioctl = kvm_vm_compat_ioctl, +#endif .mmap = kvm_vm_mmap, };
Signature · 1 line
1.6.0.2
A message that is not in the archive (sent off-list or not yet received): 1256290914-18169-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org
Marcelo Tosatti
AppliedQuoted 8 lines · Alexander Graf
Jan spotted that we shouldn't use a function only available when
CONFIG_COMPATin a struct that's available without the config option.So since my patch introduces that, let's just not export the compat ioctl function when
CONFIG_COMPATis not set, so we don't break then.Reported-by Jan Kiszka <[email protected]>Signed-off-by Alexander Graf <[email protected]>
Applied, thanks.