From: Linus Torvalds Date: Tue, 26 Jul 2011 06:09:27 +0000 (-0700) Subject: Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=d5ef642355bdd9b383ff5c18cbc6102a06eecbaf;p=~shefty%2Frdma-dev.git Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (26 commits) amba pl011: workaround for uart registers lockup n_gsm: fix the wrong FCS handling pch_uart: add missing comment about OKI ML7223 pch_uart: Add MSI support tty: fix "IRQ45: nobody cared" PTI feature to allow user to name and mark masterchannel request. 0 for o PTI Makefile bug. tty: serial: samsung.c remove legacy PM code. SERIAL: SC26xx: Fix link error. serial: mrst_max3110: initialize waitqueue earlier mrst_max3110: Change max missing message priority. tty: s5pv210: Add delay loop on fifo reset function for UART tty/serial: Fix XSCALE serial ports, e.g. ce4100 serial: bfin_5xx: fix off-by-one with resource size drivers/tty: use printk_ratelimited() instead of printk_ratelimit() tty: n_gsm: Added refcount usage to gsm_mux and gsm_dlci structs tty: n_gsm: Add raw-ip support tty: n_gsm: expose gsmtty device nodes at ldisc open time pch_phub: Fix register miss-setting issue serial: 8250, increase PASS_LIMIT ... --- d5ef642355bdd9b383ff5c18cbc6102a06eecbaf diff --cc drivers/misc/pti.c index e5f295a38a3,96a25e3b484..8653bd0b1a3 --- a/drivers/misc/pti.c +++ b/drivers/misc/pti.c @@@ -472,14 -492,12 +493,14 @@@ static int pti_tty_install(struct tty_d return -ENOMEM; if (idx == PTITTY_MINOR_START) - pti_tty_data->mc = pti_request_masterchannel(0); + pti_tty_data->mc = pti_request_masterchannel(0, NULL); else - pti_tty_data->mc = pti_request_masterchannel(2); + pti_tty_data->mc = pti_request_masterchannel(2, NULL); - if (pti_tty_data->mc == NULL) + if (pti_tty_data->mc == NULL) { + kfree(pti_tty_data); return -ENXIO; + } tty->driver_data = pti_tty_data; } diff --cc drivers/tty/n_gsm.c index 19b4ae052af,14522ee8a91..8a50e4eebf1 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@@ -875,11 -904,12 +904,13 @@@ static int gsm_dlci_data_output_framed( *dp++ = last << 7 | first << 6 | 1; /* EA */ len--; } - memcpy(dp, skb_pull(dlci->skb, len), len); + memcpy(dp, dlci->skb->data, len); + skb_pull(dlci->skb, len); __gsm_data_queue(dlci, msg); - if (last) + if (last) { + kfree_skb(dlci->skb); dlci->skb = NULL; + } return size; }