[media] lirc: wire up .compat_ioctl to main ioctl handler
As pointed out (and tested) by Joris van Rantwijk, we do actually need to wire up .compat_ioctl for 32-bit lirc userspace to work with 64-bit lirc kernelspace. Do it. And add a check to make sure we get a valid irctl in the ioctl handler. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
a126681810
commit
8be292cc03
@@ -339,6 +339,9 @@ static const struct file_operations lirc_fops = {
|
||||
.write = lirc_write,
|
||||
.poll = lirc_poll,
|
||||
.unlocked_ioctl = lirc_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = lirc_ioctl,
|
||||
#endif
|
||||
.open = lirc_open,
|
||||
.release = lirc_close,
|
||||
};
|
||||
|
||||
@@ -546,6 +546,9 @@ static const struct file_operations lirc_fops = {
|
||||
.write = lirc_write,
|
||||
.poll = lirc_poll,
|
||||
.unlocked_ioctl = lirc_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = lirc_ioctl,
|
||||
#endif
|
||||
.open = lirc_open,
|
||||
.release = lirc_close
|
||||
};
|
||||
|
||||
@@ -1053,6 +1053,9 @@ static const struct file_operations lirc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.write = lirc_write,
|
||||
.unlocked_ioctl = lirc_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = lirc_ioctl,
|
||||
#endif
|
||||
.read = lirc_dev_fop_read,
|
||||
.poll = lirc_dev_fop_poll,
|
||||
.open = lirc_dev_fop_open,
|
||||
|
||||
@@ -456,6 +456,9 @@ static const struct file_operations lirc_fops = {
|
||||
.write = lirc_write,
|
||||
.poll = lirc_poll,
|
||||
.unlocked_ioctl = lirc_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = lirc_ioctl,
|
||||
#endif
|
||||
.open = lirc_dev_fop_open,
|
||||
.release = lirc_dev_fop_close,
|
||||
};
|
||||
|
||||
@@ -1139,6 +1139,9 @@ static const struct file_operations lirc_fops = {
|
||||
.write = write,
|
||||
.poll = poll,
|
||||
.unlocked_ioctl = ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = ioctl,
|
||||
#endif
|
||||
.open = open,
|
||||
.release = close
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user