Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ip2: push BKL down for the firmware interface

(The tty side is already done)

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
47be36a2 76528a42

+8 -5
+8 -5
drivers/char/ip2/ip2main.c
··· 203 203 204 204 static ssize_t ip2_ipl_read(struct file *, char __user *, size_t, loff_t *); 205 205 static ssize_t ip2_ipl_write(struct file *, const char __user *, size_t, loff_t *); 206 - static int ip2_ipl_ioctl(struct inode *, struct file *, UINT, ULONG); 206 + static long ip2_ipl_ioctl(struct file *, UINT, ULONG); 207 207 static int ip2_ipl_open(struct inode *, struct file *); 208 208 209 209 static int DumpTraceBuffer(char __user *, int); ··· 236 236 .owner = THIS_MODULE, 237 237 .read = ip2_ipl_read, 238 238 .write = ip2_ipl_write, 239 - .ioctl = ip2_ipl_ioctl, 239 + .unlocked_ioctl = ip2_ipl_ioctl, 240 240 .open = ip2_ipl_open, 241 241 }; 242 242 ··· 2845 2845 /* */ 2846 2846 /* */ 2847 2847 /******************************************************************************/ 2848 - static int 2849 - ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg ) 2848 + static long 2849 + ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg ) 2850 2850 { 2851 - unsigned int iplminor = iminor(pInode); 2851 + unsigned int iplminor = iminor(pFile->f_path.dentry->d_inode); 2852 2852 int rc = 0; 2853 2853 void __user *argp = (void __user *)arg; 2854 2854 ULONG __user *pIndex = argp; ··· 2858 2858 #ifdef IP2DEBUG_IPL 2859 2859 printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg ); 2860 2860 #endif 2861 + 2862 + lock_kernel(); 2861 2863 2862 2864 switch ( iplminor ) { 2863 2865 case 0: // IPL device ··· 2921 2919 rc = -ENODEV; 2922 2920 break; 2923 2921 } 2922 + unlock_kernel(); 2924 2923 return rc; 2925 2924 } 2926 2925