diff options
author | Phil Sutter <phil.sutter@viprinet.com> | 2010-06-17 14:45:17 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-17 20:32:15 +0200 |
commit | 26e1a7a351626f770514f001457bb307e08a177c (patch) | |
tree | f343fcf8b27ed98b3674692f83ff2e527c6ba589 /cryptodev_main.c | |
parent | f56ee62857576a90a3f2c66f66b324884940fcb7 (diff) | |
download | kernel-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.c | 7 |
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 = { |