Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5054582pxu; Thu, 10 Dec 2020 11:43:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6FfuKBt3tzp4nNGN2ooi3mtB+078kErFEtL9gtiIkCANH6iODhKzmtTKW/MeZcDVkYE5c X-Received: by 2002:a17:906:7a46:: with SMTP id i6mr7555037ejo.257.1607629429599; Thu, 10 Dec 2020 11:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607629429; cv=none; d=google.com; s=arc-20160816; b=GUHH36dcdV9LNsOa240dnFC8NaBu+qi96KeOb93Mb7ASPLqfeZXXu5I0AmiqlKcRn1 c3nO3Hk4Wg0xvBslqf9aWUAgqZxHHOfW55JCJ46ZbJJYgg5rGSArVJQvt1t8MdvOsr7O au7Mi7SQ7ls01cyBsK3nSxAxSD7J3e+Dz0SOlTKcbB1I8N0OgJiIC3mJIHLcHkjl5yvy TGbswDkCi5/HfKsW9ySTk4w51Z1YuPPhpDvq52ygSidxjvR/akTeeD6UhqZiT2Cr8Y8E F8tWS/QUvUVIww6Opdk8P48OTMDxwMh6wuucTZ8jXhC79gin/cv4MV0hGQpdkoCwSo+2 Np5g== 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=AsYeYAfgibIzihkQmXUwMY1ZC4U33uXCLpWfDEKv0+M=; b=vGYoS+eiw+R0vfkwacfj+V3bgQZhBsz2Bn5ZSYwI/chvD6scGEM0IZzs7myOEGx4uL THd/S9VTK/FYAPgWvNYdoOOK5GAU7f2P2Is+m1/HuzcAyetBt2nCMnnGzDjcupnM6PGx zIVPbpeeSROXmhaiTD4xugPcKOXr34/xvJC3tLqBHVr7QlCogaIHarviX7FL9yOJydp0 71lOZDAx3IbKNW4ZmZuvcv5gIBxhNMjuoa2r+DvaMdbdt2FemwErcsjkjhws1Y1SrBlE K++tOF3g7mkmthjhf2UABsjQ/8lZJ1ZVQiUcr0kh8A8RpOqD2lpbF9KF6UaYeX3czBvV IEPA== 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 a15si3227531edb.360.2020.12.10.11.43.26; Thu, 10 Dec 2020 11:43:49 -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 S2393469AbgLJThv (ORCPT + 99 others); Thu, 10 Dec 2020 14:37:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:36554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390176AbgLJO2v (ORCPT ); Thu, 10 Dec 2020 09:28:51 -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.9 01/45] net/af_iucv: set correct sk_protocol for child sockets Date: Thu, 10 Dec 2020 15:26:15 +0100 Message-Id: <20201210142602.429421533@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.361598591@linuxfoundation.org> References: <20201210142602.361598591@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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 @@ -1753,7 +1753,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); @@ -1963,7 +1963,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) ||