Skip to content

Commit c43ef17

Browse files
author
Jonathan Corbet
committed
snsc: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 78a3c3d commit c43ef17

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎drivers/char/snsc.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/poll.h>
2222
#include <linux/module.h>
2323
#include <linux/slab.h>
24+
#include <linux/smp_lock.h>
2425
#include <asm/sn/io.h>
2526
#include <asm/sn/sn_sal.h>
2627
#include <asm/sn/module.h>
@@ -104,16 +105,18 @@ scdrv_open(struct inode *inode, struct file *file)
104105
file->private_data = sd;
105106

106107
/* hook this subchannel up to the system controller interrupt */
108+
lock_kernel();
107109
rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt,
108110
IRQF_SHARED | IRQF_DISABLED,
109111
SYSCTL_BASENAME, sd);
110112
if (rv) {
111113
ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch);
112114
kfree(sd);
113115
printk("%s: irq request failed (%d)\n", __func__, rv);
116+
unlock_kernel();
114117
return -EBUSY;
115118
}
116-
119+
unlock_kernel();
117120
return 0;
118121
}
119122

0 commit comments

Comments
 (0)