Re: [PATCH] tty: hold lock across tty buffer finding and bufferfilling
From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Thu Mar 15 2012 - 16:26:35 EST
On Thu, Mar 15, 2012 at 02:06:43AM +0000, Tu, Xiaobing wrote:
> From: Xiaobing Tu <xiaobing.tu@xxxxxxxxx>
>
> tty_buffer_request_room is well protected, but while after it returns,
> it releases the port->lock. tty->buf.tail might be modified
> by either irq handler or other threads. The patch adds more protection
> by holding the lock across tty buffer finding and buffer filling.
>
> Signed-off-by: Alek Du <alek.du@xxxxxxxxx>
> Signed-off-by: Xiaobing Tu <xiaobing.tu@xxxxxxxxx>
> ---
> drivers/tty/tty_buffer.c | 85 +++++++++++++++++++++++++++++++++++-----------
> 1 files changed, 65 insertions(+), 20 deletions(-)
> mode change 100644 => 100755 drivers/tty/tty_buffer.c
>
> diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
> old mode 100644
> new mode 100755
What? Why would you change the mode of the file to be executable?
Also, your patch introduces a bunch of trailing whitespace, please run
it through scripts/checkpatch.pl and fix those issues before resending
it.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/