Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1676920pxu; Sun, 6 Dec 2020 03:43:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlhWi6gZ85Vts5HkHwq7hFzy6ZvhLiQnSLmzunu6//sK5y8yaHPCijNL26301IWCHieoGv X-Received: by 2002:a17:906:8354:: with SMTP id b20mr14843391ejy.397.1607255022225; Sun, 06 Dec 2020 03:43:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255022; cv=none; d=google.com; s=arc-20160816; b=FgGPx4euuDo9oaVqITAHfA6S3ToVyIIi2EFC82vVkvvU/HN+vY7c/g2UPZDjfXoAc6 wMCupPIWi6G9a0wmaW6ZK0bAKFbgpMhaYnbqqJ0gD693n12MofTk4R533dU3wv/Y7Rql ufOM2JuM1L66TkEq4GOdPq5605IstQeuElrcyzj7gwSYUJsNfiLHIXble2SRn4qvD4Iz sMKr3dsDBi4MfWwgvS7TiAwRaXvj3YtXW7Uy7GFU/4EirY12TJFUdULgiO27YM06Odtr j0WX4PCFo0jxGi6ymIeP/wUqHN31I7Qcs9n9aoADFnIfp1A3uh2g0pLAudZ8k3Besvpq qf3Q== 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=CUwnzHWa5nmyOHTWyoueAUha6e4vP9oF0SQnxCEFvIU=; b=GwGX23i2xpwkGkmLlWPi/u90oEhL45TLUakMdykxaIdRsLQYjcQ/zPvYp2HzcllcFC zJkh6S7TkVShWcy1W36Mv2yWKmu8imLH1ttLi+lS4RH7rTjpzOCxQwamDOgXcXnX1MPy kFxBpw/cAJdS3xg35Cd71CNTiUEfeFXKN6QcZ6pn4vN0XabrhMUO/WUzGX8PHgyrsUIN 4OXipniBJ3QTtHe4kj/n9E0bRH/DDrF94u8k49lASG4jEMm0bjWghj9Y6JiWKu5cnWu0 Q+4K9gII7i88hdBe340q9Vb9VLu98Dx0GPHyNOCShza6Zr9jkbMJFeht558dPl9yG9i2 xC7A== 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 rv27si4589511ejb.720.2020.12.06.03.43.19; Sun, 06 Dec 2020 03:43:42 -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 S1728404AbgLFLkF (ORCPT + 99 others); Sun, 6 Dec 2020 06:40:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:36900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbgLFLkE (ORCPT ); Sun, 6 Dec 2020 06:40:04 -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 4.19 02/32] net/af_iucv: set correct sk_protocol for child sockets Date: Sun, 6 Dec 2020 12:17:02 +0100 Message-Id: <20201206111555.899493354@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111555.787862631@linuxfoundation.org> References: <20201206111555.787862631@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 @@ -1782,7 +1782,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); @@ -1992,7 +1992,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) ||