Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp634574pxj; Thu, 20 May 2021 18:32:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuJKQalqg1SKeXW6aGWrHcZ9yXtyQK+ynPA8oK9Hz1UOdOc0p1L5q9yRahXij+Q8onO4/Z X-Received: by 2002:a5d:87d0:: with SMTP id q16mr9135344ios.177.1621560753233; Thu, 20 May 2021 18:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621560753; cv=none; d=google.com; s=arc-20160816; b=iaxgCW4xsZVLPbGF7KPx5k8X623L+3IlbOewFIvTjBbliZt8q7s8mHfHTMIaWAI6k9 zddm22SMWTKwCZCNAbdHpjlGkTnuF3axlPBaptqREeOfWampl6Yt2ossH80AyHnDwPfa Y0keK+Zxo5jAi03zHWq72OFFHgPMc74BntHOYDbHbhx2S5BTS2fpnvqJdoBA+qpZgyS2 DAe92FgAU8koVbSfAA9sQNv7Az1hAWGwjeI9vn9JFWfDJWXMbHt7EZ2Fqo6m24FdZwSN gT4FmPdclAWyoneO2HBaRaELbRF4vaq2YKgh7/Neqtd30ASCmpojUJPejSEma5ON0Q3m XGqg== 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:dkim-signature; bh=TYCDuzL2gRhe6Rv3dx0Oqirh96YK+ofmmYix3+N3ECI=; b=abxbtCw5R1Ixg9D6wjn4mqaLhcM/T7u5BNvq52lphBzdyJr7cX0t9uAoaL8/UL99da 1eaU164TkL5IkAV5PTwP9IdEnN05T8FtWgm86i4hNLLe7rRLvcF1vQX7HGrC3f9HR6R8 vxx4aXnwyYuXLWCWK01XVQUE3BPj+OWOk6p06z9sHpsbIFQt4h34F8saNNdWH17K22BD 39u22zA+yfPnFoSlkFQ5qiI7kc1O3mfmq4zk+sWeLsA0w+WHg5mBphjU16/qmk9gIboY Yz1p+CLM0sdhVJEVJ39/DDN6dvJKm8taAYw678Ghor+30+J6ue1CdlG/sU12AhxKELox 1esw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sYzVrZQ/"; 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=pass (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 d9si3811179ils.122.2021.05.20.18.32.20; Thu, 20 May 2021 18:32:33 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sYzVrZQ/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242736AbhETLk1 (ORCPT + 99 others); Thu, 20 May 2021 07:40:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:39588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240997AbhETLTt (ORCPT ); Thu, 20 May 2021 07:19:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D9A961D7E; Thu, 20 May 2021 10:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505441; bh=BRdGr/TlbkTLITp74Ajm2rEP1BuzEVJewHTKzHPom0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sYzVrZQ/t9ypZAgQpDguz3B0un5PKlKvUSefriU4ExFpPFN8zyIBDRvHUpvaoeQdp 1iG+UY6zSv6fSRL3un26Abaiqkf5v2aSjXK2nurDH9o6918v4jQEjZpJDQlEgL2gbC Ojg9HBC+HsePnHF1+lcfQGmVkh4v/GkFM2VDZejw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jon Maloy , Hoang Le , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 136/190] tipc: convert dest nodes address to network order Date: Thu, 20 May 2021 11:23:20 +0200 Message-Id: <20210520092106.691076367@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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: Hoang Le [ Upstream commit 1980d37565061ab44bdc2f9e4da477d3b9752e81 ] (struct tipc_link_info)->dest is in network order (__be32), so we must convert the value to network order before assigning. The problem detected by sparse: net/tipc/netlink_compat.c:699:24: warning: incorrect type in assignment (different base types) net/tipc/netlink_compat.c:699:24: expected restricted __be32 [usertype] dest net/tipc/netlink_compat.c:699:24: got int Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 0975a28f8686..fb1b5dcf0142 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c @@ -632,7 +632,7 @@ static int tipc_nl_compat_link_dump(struct tipc_nl_compat_msg *msg, nla_parse_nested(link, TIPC_NLA_LINK_MAX, attrs[TIPC_NLA_LINK], NULL); - link_info.dest = nla_get_flag(link[TIPC_NLA_LINK_DEST]); + link_info.dest = htonl(nla_get_flag(link[TIPC_NLA_LINK_DEST])); link_info.up = htonl(nla_get_flag(link[TIPC_NLA_LINK_UP])); nla_strlcpy(link_info.str, link[TIPC_NLA_LINK_NAME], TIPC_MAX_LINK_NAME); -- 2.30.2