diff options
author | He Zhe <zhe.he@windriver.com> | 2020-03-04 07:39:07 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-05-04 10:07:04 +0200 |
commit | 3b4ff4eb904fef04c36b39052ca8eb31fa41fad0 (patch) | |
tree | 2f22b1198a135246ed002326a5976585e43e70f6 | |
parent | x86/mce: Drop bogus comment about mce.kflags (diff) | |
download | linux-3b4ff4eb904fef04c36b39052ca8eb31fa41fad0.tar.xz linux-3b4ff4eb904fef04c36b39052ca8eb31fa41fad0.zip |
x86/mcelog: Add compat_ioctl for 32-bit mcelog support
A 32-bit version of mcelog issuing ioctls on /dev/mcelog causes errors
like the following:
MCE_GET_RECORD_LEN: Inappropriate ioctl for device
This is due to a missing compat_ioctl callback.
Assign to it compat_ptr_ioctl() as a generic implementation of the
.compat_ioctl file operation to ioctl functions that either ignore the
argument or pass a pointer to a compatible data type.
[ bp: Massage commit message. ]
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/1583303947-49858-1-git-send-email-zhe.he@windriver.com
-rw-r--r-- | arch/x86/kernel/cpu/mce/dev-mcelog.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mce/dev-mcelog.c b/arch/x86/kernel/cpu/mce/dev-mcelog.c index c033e7ea9e3c..a4fd5287f02f 100644 --- a/arch/x86/kernel/cpu/mce/dev-mcelog.c +++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c @@ -329,6 +329,7 @@ static const struct file_operations mce_chrdev_ops = { .write = mce_chrdev_write, .poll = mce_chrdev_poll, .unlocked_ioctl = mce_chrdev_ioctl, + .compat_ioctl = compat_ptr_ioctl, .llseek = no_llseek, }; |