linux-stable/net/x25
Martin Schiller 3611823087 net/x25: Fix null-ptr-deref in x25_connect
This fixes a regression for blocking connects introduced by commit
4becb7ee5b ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect").

The x25->neighbour is already set to "NULL" by x25_disconnect() now,
while a blocking connect is waiting in
x25_wait_for_connection_establishment(). Therefore x25->neighbour must
not be accessed here again and x25->state is also already set to
X25_STATE_0 by x25_disconnect().

Fixes: 4becb7ee5b ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Reviewed-by: Xie He <xie.he.0141@gmail.com>
Link: https://lore.kernel.org/r/20201109065449.9014-1-ms@dev.tdt.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-11 14:53:56 -08:00
..
af_x25.c net/x25: Fix null-ptr-deref in x25_connect 2020-11-11 14:53:56 -08:00
Kconfig Replace HTTP links with HTTPS ones: X.25 network layer 2020-07-07 15:44:44 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysctl_net_x25.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x25_dev.c net/x25: Fix x25_neigh refcnt leak when receiving frame 2020-04-23 15:39:39 -07:00
x25_facilities.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
x25_forward.c net: x25: convert to list_for_each_entry_safe() 2020-02-16 18:59:42 -08:00
x25_in.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
x25_link.c net: x25: kerneldoc fixes 2020-07-13 17:20:40 -07:00
x25_out.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 41 2019-05-24 17:27:12 +02:00
x25_proc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 41 2019-05-24 17:27:12 +02:00
x25_route.c net: x25: kerneldoc fixes 2020-07-13 17:20:40 -07:00
x25_subr.c net/x25: Fix null-ptr-deref in x25_disconnect 2020-04-28 14:08:59 -07:00
x25_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 41 2019-05-24 17:27:12 +02:00