android_kernel_samsung_msm8976/drivers
Alexander Popov 4167230bef tty: n_hdlc: get rid of racy n_hdlc.tbuf
commit 82f2341c94d270421f383641b7cd670e474db56b upstream.

Currently N_HDLC line discipline uses a self-made singly linked list for
data buffers and has n_hdlc.tbuf pointer for buffer retransmitting after
an error.

The commit be10eb7589
("tty: n_hdlc add buffer flushing") introduced racy access to n_hdlc.tbuf.
After tx error concurrent flush_tx_queue() and n_hdlc_send_frames() can put
one data buffer to tx_free_buf_list twice. That causes double free in
n_hdlc_release().

Let's use standard kernel linked list and get rid of n_hdlc.tbuf:
in case of tx error put current data buffer after the head of tx_buf_list.

Signed-off-by: Alexander Popov <alex.popov@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2017-04-22 23:02:57 +02:00
..
accessibility
acpi
amba
android Import latest Samsung release 2017-04-18 03:43:52 +02:00
ata This is the 3.10.100 stable release 2017-04-18 17:17:52 +02:00
atm
auxdisplay
base Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
battery Import latest Samsung release 2017-04-18 03:43:52 +02:00
battery_v2 Import latest Samsung release 2017-04-18 03:43:52 +02:00
bcma
bif
block This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
bluetooth This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
bus
cdrom
char This is the 3.10.97 stable release 2017-04-18 17:17:20 +02:00
clk This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
clocksource This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
connector
coresight
cpufreq Import latest Samsung release 2017-04-18 03:43:52 +02:00
cpuidle Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
crypto Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
dca
debug Import latest Samsung release 2017-04-18 03:43:52 +02:00
debug_32 Import latest Samsung release 2017-04-18 03:43:52 +02:00
devfreq devfreq_devbw: Assign labels to devbw nodes. 2017-04-18 12:24:57 +02:00
dio
dma Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
edac This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
eisa
esoc
extcon Import latest Samsung release 2017-04-18 03:43:52 +02:00
fingerprint drivers: fingerprint: Kill FEATURE_SPI_WAKELOCK 2017-04-19 17:02:36 +02:00
firewire This is the 3.10.95 stable release 2017-04-18 17:14:54 +02:00
firmware Import T813XXU2BQD1 kernel source changes 2017-04-22 16:30:03 +02:00
gpio Import latest Samsung release 2017-04-18 03:43:52 +02:00
gpu This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
gud mobicore_driver: TlcTui is dead 2017-04-18 04:11:35 +02:00
hid This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
hsi
hv
hwmon This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
hwspinlock
i2c This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
ide
idle
iio This is the 3.10.98 stable release 2017-04-18 17:17:24 +02:00
infiniband
input Input: aiptek - fix crash on detecting device without endpoints 2017-04-22 23:02:52 +02:00
iommu This is the 3.10.98 stable release 2017-04-18 17:17:24 +02:00
ipack
irqchip Import latest Samsung release 2017-04-18 03:43:52 +02:00
isdn
leds Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
lguest Import latest Samsung release 2017-04-18 03:43:52 +02:00
macintosh
mailbox
md This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
media msm: cpp: Remove duplicate for integer overflow in cpp 2017-04-22 23:02:47 +02:00
memory
memstick
message
mfd This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
misc This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
mmc This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
motor Import latest Samsung release 2017-04-18 03:43:52 +02:00
mtd This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
muic Import latest Samsung release 2017-04-18 03:43:52 +02:00
net qcacld-2.0: Remove the support for iw_set_priv ioctl 2017-04-19 00:05:10 +02:00
nfc Import latest Samsung release 2017-04-18 03:43:52 +02:00
ntb
nubus
of Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
oprofile
parisc
parport
pci This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
pcmcia
phy
pinctrl Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
platform This is the 3.10.98 stable release 2017-04-18 17:17:24 +02:00
pnp
power Revert "power: reset: msm: Don't override power off type for GTS210VE" 2017-04-20 13:32:11 +02:00
pps
ps3
ptp
pwm
rapidio
regulator Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
remoteproc
reset
rpmsg
rtc This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
s390
sbus
scsi sg: Fix double-free when drives detach during SG_IO 2017-04-22 23:02:54 +02:00
sensorhub Import latest Samsung release 2017-04-18 03:43:52 +02:00
sensors Import latest Samsung release 2017-04-18 03:43:52 +02:00
sfi
sh
slimbus Import latest Samsung release 2017-04-18 03:43:52 +02:00
sn
soc Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
soundwire
spi This is the 3.10.97 stable release 2017-04-18 17:17:20 +02:00
spmi Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
ssb
ssbi
staging ANDROID: ion: Protect kref from userspace manipulation 2017-04-22 23:02:56 +02:00
switch
target This is the 3.10.98 stable release 2017-04-18 17:17:24 +02:00
tc
thermal Import latest Samsung release 2017-04-18 03:43:52 +02:00
tty tty: n_hdlc: get rid of racy n_hdlc.tbuf 2017-04-22 23:02:57 +02:00
uio Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
usb This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
uwb
vfio
vhost Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
video fbdev: color map copying bounds checking 2017-04-22 23:02:55 +02:00
virt
virtio
vlynq
vme
w1
watchdog
xen This is the 3.10.96 stable release 2017-04-18 17:16:02 +02:00
zorro
Kconfig Import latest Samsung release 2017-04-18 03:43:52 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00