linux-stable/drivers/net/wan
Cong Wang 781e26adfd net/wan: fix a double free in x25_asy_open_tty()
[ Upstream commit d5c7c745f2 ]

When x25_asy_open() fails, it already cleans up by itself,
so its caller doesn't need to free the memory again.

It seems we still have to call x25_asy_free() to clear the SLF_INUSE
bit, so just set these pointers to NULL after kfree().

Reported-and-tested-by: syzbot+5e5e969e525129229052@syzkaller.appspotmail.com
Fixes: 3b780bed31 ("x25_asy: Free x25_asy on x25_asy_open() failure.")
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-09 17:38:32 +01:00
..
lmc Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-08-05 13:04:31 -07:00
.gitignore
c101.c
cosa.c
cosa.h
dlci.c
dscc4.c
farsync.c farsync: remove redundant variable txq_length 2018-07-07 20:49:08 +09:00
farsync.h
fsl_ucc_hdlc.c wan/fsl_ucc_hdlc: use IS_ERR_VALUE() to check return value of qe_muram_alloc 2018-07-23 11:07:10 -07:00
fsl_ucc_hdlc.h
hd64570.c
hd64570.h
hd64572.c
hd64572.h
hdlc.c
hdlc_cisco.c
hdlc_fr.c
hdlc_ppp.c
hdlc_raw.c
hdlc_raw_eth.c
hdlc_x25.c
hostess_sv11.c
ixp4xx_hss.c
Kconfig
lapbether.c
Makefile
n2.c
pc300too.c
pci200syn.c
sbni.c
sbni.h
sdla.c
sealevel.c
slic_ds26522.c
slic_ds26522.h
wanxl.c
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S
x25_asy.c net/wan: fix a double free in x25_asy_open_tty() 2019-01-09 17:38:32 +01:00
x25_asy.h
z85230.c
z85230.h