Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1678728pxu; Sun, 6 Dec 2020 03:48:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2ejI87J/P9M1D4BgyU2WDF9HH+QTS6T3Blc298B/uJKzQ2lFdGtpy14bH5k0oLMo0mPO1 X-Received: by 2002:a17:906:4d47:: with SMTP id b7mr14590358ejv.420.1607255285718; Sun, 06 Dec 2020 03:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255285; cv=none; d=google.com; s=arc-20160816; b=qN/LKaMBx/e9u/WKDo+IUA4nStF1Soip9ernOkOYF+oaKtQ+f/eLZz/HW1Zco461F7 bZzKepDzwoF4k6PvTn+SXK3fVmkhl2MgUmzJpeFOKWK7Z3ArScK9iKB6NEJ9soICuvXV BC9TNbmEJHiV2GIoub2B4lKGBnM1IJrKsIgeCoCR6VVkGZXHCPdoiB3FLCLOB0iMnKwA 3WJ416ISquwX6hDHlhAuJaBMhhOuQ/0vhKXq5+ba5iiwBeWexLBeeBsjOqQt3+29JgOF hQfPDnVlb3GCW0rFXaXo9tXyCiyPRChXQoN2XJTEu6BsVsITkFd9pGeEWayUpG5aH84a rHew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=TtTdnmwVHQkwG1e0wYb7WEzuR83jCvWOLa+NqC8Tqno=; b=I0IrYpSoORfeLW/Yr7aZm8+/0oTpczkWTUT5kb19UL6mEhDcW0tpP4Q5sTQac5epXh yVrTMvcXA1wYvBm3zIJZRZW5Rot7c9rShtljUe73W2govlmX53G80/vI2j5RV+cexltl e4GiXcNBlyLL27XOyW3NzrykFS15aEbZHcyuFCnJv4eYrRCTYy4j7EEl3ay5WR7Ua1Zc V0jyAi8KVepv7D5t0Dw6tA7c/XotVGdrzJyoTHHRKXD7bKTenw49abgAhNvmKXsaEPA1 6ClD2Vlsn6m6OprAhcwZj65gO2y0VJvT3IgHfvWTrwoeNrDXnZK2AyMdoi7HFn1Wg3hE XGmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si5032101edf.510.2020.12.06.03.47.42; Sun, 06 Dec 2020 03:48:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729230AbgLFLnu (ORCPT + 99 others); Sun, 6 Dec 2020 06:43:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:42792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729213AbgLFLnr (ORCPT ); Sun, 6 Dec 2020 06:43:47 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Wiedmann , Jakub Kicinski Subject: [PATCH 5.9 04/46] net/af_iucv: set correct sk_protocol for child sockets Date: Sun, 6 Dec 2020 12:17:12 +0100 Message-Id: <20201206111556.655054877@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111556.455533723@linuxfoundation.org> References: <20201206111556.455533723@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julian Wiedmann [ Upstream commit c5dab0941fcdc9664eb0ec0d4d51433216d91336 ] Child sockets erroneously inherit their parent's sk_type (ie. SOCK_*), instead of the PF_IUCV protocol that the parent was created with in iucv_sock_create(). We're currently not using sk->sk_protocol ourselves, so this shouldn't have much impact (except eg. getting the output in skb_dump() right). Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support") Signed-off-by: Julian Wiedmann Link: https://lore.kernel.org/r/20201120100657.34407-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/iucv/af_iucv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -1645,7 +1645,7 @@ static int iucv_callback_connreq(struct } /* Create the new socket */ - nsk = iucv_sock_alloc(NULL, sk->sk_type, GFP_ATOMIC, 0); + nsk = iucv_sock_alloc(NULL, sk->sk_protocol, GFP_ATOMIC, 0); if (!nsk) { err = pr_iucv->path_sever(path, user_data); iucv_path_free(path); @@ -1851,7 +1851,7 @@ static int afiucv_hs_callback_syn(struct goto out; } - nsk = iucv_sock_alloc(NULL, sk->sk_type, GFP_ATOMIC, 0); + nsk = iucv_sock_alloc(NULL, sk->sk_protocol, GFP_ATOMIC, 0); bh_lock_sock(sk); if ((sk->sk_state != IUCV_LISTEN) || sk_acceptq_is_full(sk) ||