summaryrefslogtreecommitdiffstats
path: root/cryptodev_main.c
diff options
context:
space:
mode:
authorPhil Sutter <phil.sutter@viprinet.com>2010-06-17 14:45:17 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-06-17 20:32:15 +0200
commit26e1a7a351626f770514f001457bb307e08a177c (patch)
treef343fcf8b27ed98b3674692f83ff2e527c6ba589 /cryptodev_main.c
parentf56ee62857576a90a3f2c66f66b324884940fcb7 (diff)
downloadkernel-crypto-26e1a7a351626f770514f001457bb307e08a177c.tar.gz
kernel-crypto-26e1a7a351626f770514f001457bb307e08a177c.tar.xz
kernel-crypto-26e1a7a351626f770514f001457bb307e08a177c.zip
ioctl_compat: hide code from user, enable conditionally
Diffstat (limited to 'cryptodev_main.c')
-rw-r--r--cryptodev_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cryptodev_main.c b/cryptodev_main.c
index d016931c39a..9fac1e6c068 100644
--- a/cryptodev_main.c
+++ b/cryptodev_main.c
@@ -582,6 +582,9 @@ cryptodev_ioctl(struct inode *inode, struct file *filp,
}
}
+/* compatibility code for 32bit userlands */
+#ifdef CONFIG_COMPAT
+
static inline void
compat_to_session_op(struct compat_session_op *compat, struct session_op *sop)
{
@@ -674,12 +677,16 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
}
+#endif /* CONFIG_COMPAT */
+
struct file_operations cryptodev_fops = {
.owner = THIS_MODULE,
.open = cryptodev_open,
.release = cryptodev_release,
.ioctl = cryptodev_ioctl,
+#ifdef CONFIG_COMPAT
.compat_ioctl = cryptodev_compat_ioctl,
+#endif /* CONFIG_COMPAT */
};
struct miscdevice cryptodev = {