diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-06-16 13:23:15 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-06-16 13:23:22 +0200 |
commit | b4f9f2b64aa189c5584f266f4f0343af7a705441 (patch) | |
tree | f410718bb93590ff61682b566c10f70d5883bbcd /drivers/tty/vt/selection.c | |
parent | 76369139ceb955deefc509e6e12ce9d6ce50ccab (diff) | |
parent | 2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff) | |
download | lwn-b4f9f2b64aa189c5584f266f4f0343af7a705441.tar.gz lwn-b4f9f2b64aa189c5584f266f4f0343af7a705441.zip |
Merge commit 'v3.0-rc3' into perf/core
Merge reason: add the latest fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/tty/vt/selection.c')
-rw-r--r-- | drivers/tty/vt/selection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c index 67b1d0d7c8ac..fb864e7fcd13 100644 --- a/drivers/tty/vt/selection.c +++ b/drivers/tty/vt/selection.c @@ -332,7 +332,8 @@ int paste_selection(struct tty_struct *tty) continue; } count = sel_buffer_lth - pasted; - count = tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted, + count = min(count, tty->receive_room); + tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted, NULL, count); pasted += count; } |