]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:27:26 +0000 (08:27 -0700)
commite54195a3bb9d5025d96b0e3d3bb8de07a506d4f5
tree0e3c7d4b0130db6c9a6ba4baf2adb2ab2413f3a0
parenta4e92d29a86daf9609c875eccb1357657f2ac93f
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>
drivers/tty/n_gsm.c