forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
76528a42e2
commit
47be36a24d
@ -203,7 +203,7 @@ static int set_serial_info(i2ChanStrPtr, struct serial_struct __user *);
|
|||||||
|
|
||||||
static ssize_t ip2_ipl_read(struct file *, char __user *, size_t, loff_t *);
|
static ssize_t ip2_ipl_read(struct file *, char __user *, size_t, loff_t *);
|
||||||
static ssize_t ip2_ipl_write(struct file *, const char __user *, size_t, loff_t *);
|
static ssize_t ip2_ipl_write(struct file *, const char __user *, size_t, loff_t *);
|
||||||
static int ip2_ipl_ioctl(struct inode *, struct file *, UINT, ULONG);
|
static long ip2_ipl_ioctl(struct file *, UINT, ULONG);
|
||||||
static int ip2_ipl_open(struct inode *, struct file *);
|
static int ip2_ipl_open(struct inode *, struct file *);
|
||||||
|
|
||||||
static int DumpTraceBuffer(char __user *, int);
|
static int DumpTraceBuffer(char __user *, int);
|
||||||
@ -236,7 +236,7 @@ static const struct file_operations ip2_ipl = {
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = ip2_ipl_read,
|
.read = ip2_ipl_read,
|
||||||
.write = ip2_ipl_write,
|
.write = ip2_ipl_write,
|
||||||
.ioctl = ip2_ipl_ioctl,
|
.unlocked_ioctl = ip2_ipl_ioctl,
|
||||||
.open = ip2_ipl_open,
|
.open = ip2_ipl_open,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2845,10 +2845,10 @@ ip2_ipl_write(struct file *pFile, const char __user *pData, size_t count, loff_t
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
static int
|
static long
|
||||||
ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
|
ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg )
|
||||||
{
|
{
|
||||||
unsigned int iplminor = iminor(pInode);
|
unsigned int iplminor = iminor(pFile->f_path.dentry->d_inode);
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
void __user *argp = (void __user *)arg;
|
void __user *argp = (void __user *)arg;
|
||||||
ULONG __user *pIndex = argp;
|
ULONG __user *pIndex = argp;
|
||||||
@ -2859,6 +2859,8 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
|
|||||||
printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg );
|
printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
|
|
||||||
switch ( iplminor ) {
|
switch ( iplminor ) {
|
||||||
case 0: // IPL device
|
case 0: // IPL device
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
@ -2919,6 +2921,7 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
|
|||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
unlock_kernel();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user