]> git.karo-electronics.de Git - karo-tx-linux.git/commit
n_gsm: added interlocking for gsm_data_lock for certain code paths
authorRuss Gorby <russ.gorby@intel.com>
Mon, 13 Aug 2012 12:44:40 +0000 (13:44 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:15 +0000 (03:48 +0100)
commit083500a74cb59d5b3a3ccec5368ac850f41f3dcd
tree372ba4645d3996a80e8d8159a1960d090a80147a
parentba3fd3d6cf4a97bcb934614295aa2ee4d2cd6ac9
n_gsm: added interlocking for gsm_data_lock for certain code paths

commit 5e44708f75b0f8712da715d6babb0c21089b2317 upstream.

There were some locking holes in the management of the MUX's
message queue for 2 code paths:
1) gsmld_write_wakeup
2) receipt of CMD_FCON flow-control message
In both cases gsm_data_kick is called w/o locking so it can collide
with other other instances of gsm_data_kick (pulling messages tx_tail)
or potentially other instances of __gsm_data_queu (adding messages to tx_head)

Changed to take the tx_lock in these 2 cases

Signed-off-by: Russ Gorby <russ.gorby@intel.com>
Tested-by: Yin, Fengwei <fengwei.yin@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