summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-11-11 05:08:21 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-11 05:08:21 +0300
commite87d24fce924bfcef9714bbaeb1514162420052e (patch)
tree5dae44e357f529e2ae70154b4885f33228af76af /net
parent2b52a4b65bc8f14520fe6e996ea7fb3f7e400761 (diff)
parent4711497ae85d90de903671989daf5145054c123e (diff)
downloadlinux-e87d24fce924bfcef9714bbaeb1514162420052e.tar.xz
Merge branch 'net-iucv-fixes-2020-11-09'
Julian Wiedmann says: ==================== net/iucv: fixes 2020-11-09 One fix in the shutdown path for af_iucv sockets. This is relevant for stable as well. Also sending along an update for the Maintainers file. v1 -> v2: use the correct Fixes tag in patch 1 (Jakub) ==================== Link: https://lore.kernel.org/r/20201109075706.56573-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/iucv/af_iucv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index d80572074667..047238f01ba6 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1434,7 +1434,8 @@ static int iucv_sock_shutdown(struct socket *sock, int how)
break;
}
- if (how == SEND_SHUTDOWN || how == SHUTDOWN_MASK) {
+ if ((how == SEND_SHUTDOWN || how == SHUTDOWN_MASK) &&
+ sk->sk_state == IUCV_CONNECTED) {
if (iucv->transport == AF_IUCV_TRANS_IUCV) {
txmsg.class = 0;
txmsg.tag = 0;