n_gsm: memory leak in uplink error path
authorRuss Gorby <russ.gorby@intel.com>
Mon, 13 Aug 2012 12:45:30 +0000 (13:45 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:18 +0000 (03:48 +0100)
commitf11829e7da3cd59400fe60287a3c3a11a6ddb2ac
tree6928fb247bae361481d92e0554a6aa848f9c4c73
parent0afc4d3b3b1320437cdcc8a290ba9dd9dabe35c0
n_gsm: memory leak in uplink error path

commit 88ed2a60610974443335c924d7cb8e5dcf9dbdc1 upstream.

Uplink (TX) network data will go through gsm_dlci_data_output_framed
there is a bug where if memory allocation fails, the skb which
has already been pulled off the list will be lost.

In addition TX skbs were being processed in LIFO order

Fixed the memory leak, and changed to FIFO order processing

Signed-off-by: Russ Gorby <russ.gorby@intel.com>
Tested-by: Kappel, LaurentX <laurentx.kappel@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/n_gsm.c