tty: Drop the lock_kernel in the private ioctl hook
We don't need the BKL here any more so it can go. In a couple of spots the driver requirements are not clear so push the lock down into the driver. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
此提交包含在:
@@ -1343,6 +1343,7 @@ static void mos7840_break(struct tty_struct *tty, int break_state)
|
||||
else
|
||||
data = mos7840_port->shadowLCR & ~LCR_SET_BREAK;
|
||||
|
||||
/* FIXME: no locking on shadowLCR anywhere in driver */
|
||||
mos7840_port->shadowLCR = data;
|
||||
dbg("mcs7840_break mos7840_port->shadowLCR is %x\n",
|
||||
mos7840_port->shadowLCR);
|
||||
@@ -2214,10 +2215,12 @@ static int mos7840_set_modem_info(struct moschip_port *mos7840_port,
|
||||
break;
|
||||
}
|
||||
|
||||
lock_kernel();
|
||||
mos7840_port->shadowMCR = mcr;
|
||||
|
||||
Data = mos7840_port->shadowMCR;
|
||||
status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
|
||||
unlock_kernel();
|
||||
if (status < 0) {
|
||||
dbg("setting MODEM_CONTROL_REGISTER Failed\n");
|
||||
return -1;
|
||||
|
新增問題並參考
封鎖使用者