From 9a9473994812adbc665c810496c78cdb8b66e729 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:55 +0100 Subject: [PATCH] Revert "net/iucv: fix use after free in iucv_sock_close()" This reverts commit 438fa4e57f157bcf3d31e6ca10154960f4e91a40. --- net/iucv/af_iucv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 3d0424e4a..7c73faa53 100755 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -359,8 +359,8 @@ static void iucv_sever_path(struct sock *sk, int with_user_data) struct iucv_sock *iucv = iucv_sk(sk); struct iucv_path *path = iucv->path; - /* Whoever resets the path pointer, must sever and free it. */ - if (xchg(&iucv->path, NULL)) { + if (iucv->path) { + iucv->path = NULL; if (with_user_data) { low_nmcpy(user_data, iucv->src_name); high_nmcpy(user_data, iucv->dst_name);