Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1680161pxu; Sun, 6 Dec 2020 03:51:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3fs6NBQCCkWW1cjhprkXbP3gjUNF6yXwkB3S8T55oxX33r82Qc8SjY4XPhCQvPvJCEJuS X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr14941750ejc.13.1607255469686; Sun, 06 Dec 2020 03:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255469; cv=none; d=google.com; s=arc-20160816; b=lf4AMtTjSQ52hQlqiZdOi/Fh96oK0MXk1qMkit7qmms2tET17xQqWh40xesASIIsDB ih28vzkFONGZBEKAfmpvW03+E+SHPHyNdg3E3aHcMn8BrOn/gJD2iXyFiJgc2XghiZwD YojyDQknoqMACA+cHh+Ad6BFNZSzQaC/NOnKpibst6GP+WOfYqeZywpbIX8ttQcmp4GP QUBj9SdKDbunEMHDgPGW7c0fIN4jiDNDOGUlR4A2azwpef+IMc6G90W4CzuvO9sPhZHm adPAg9BjDAGA+qFceiJ15NdiZnOsTsGKLz3Hsg09b0t0GFo2OFowJVYyocAkpcnDH8+r szPA== 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=U9QXJ9IVFhkjpBQT/bdZYbahUz1MAw4XfXr+iSdIHLE=; b=DkN/J0iS6R/kKp4sDUoCQAT+Nj9dHcvNcAHT+WoWJIeUyS2FLwz9IpS4X/coftfxRH bZWMRMxKFw6KV7xKJzjp3hOPZKQpe3JlXOuF/H2jHYhsKGGJVxFZIjhQf7odEUOQoSJ0 kJeGBwONKI448VOYAW10yxmMX0tH4hy8428c1VrlUm6i71oT5czdlleHVRNPdUUI77zz BLqqQMZN3Y1pMOZ0D/8dg0AQCmmXJWoF8xy9Clsca6PQqTVvEhgCI25HvaZKIF2ebMu5 SYRXUED/t5yqz3zoX6+mmivrgvOM1zQPvrSH+CNM+Vri7kdjN5L7f0/mYA/r7MWHGC2h cfIg== 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 x72si6377652ede.132.2020.12.06.03.50.47; Sun, 06 Dec 2020 03:51:09 -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 S1729089AbgLFLri (ORCPT + 99 others); Sun, 6 Dec 2020 06:47:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:42378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729064AbgLFLnD (ORCPT ); Sun, 6 Dec 2020 06:43:03 -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.4 03/39] net/af_iucv: set correct sk_protocol for child sockets Date: Sun, 6 Dec 2020 12:17:07 +0100 Message-Id: <20201206111554.832788972@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111554.677764505@linuxfoundation.org> References: <20201206111554.677764505@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 @@ -1785,7 +1785,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); @@ -1991,7 +1991,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) ||