Skip to content

Commit 3b4ff4e

Browse files
He Zhesuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Tony Luck <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent f82cdff commit 3b4ff4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/cpu/mce/dev-mcelog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ static const struct file_operations mce_chrdev_ops = {
329329
.write = mce_chrdev_write,
330330
.poll = mce_chrdev_poll,
331331
.unlocked_ioctl = mce_chrdev_ioctl,
332+
.compat_ioctl = compat_ptr_ioctl,
332333
.llseek = no_llseek,
333334
};
334335

0 commit comments

Comments
 (0)