Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp456269pxj; Thu, 20 May 2021 13:22:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzAMVIXiC1NB47rBvgkFMbDYxFyLXiiciWryabQ2x53VHq5okd7fkl4czt9saZudJMaH8o X-Received: by 2002:a6b:b7cb:: with SMTP id h194mr7533121iof.139.1621542157653; Thu, 20 May 2021 13:22:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621542157; cv=none; d=google.com; s=arc-20160816; b=TL+7zSxF0N5l1bAFbir5U7OKabBqlaMucfJVEL1pb9QLTk4U0N71Vyy9v6O78mQGcR AAsRDeEWUMPK7GnR3Qoao+dTmu3rpH1rBNeRabCnXQ0aVQGERQUfm7Hr85MdmaiyVAW3 tgruduhgypjP3TnPSb4DmzbvKjvNNtVqNV3PqnKNAeRMhxmFLggaTMsTe2ozfjoNUjEu uXZzg1jp8HtKvIUfWAk8ln+3JyoRiRoPn1othP9tLsGqSjiY6LmoGvv+ZHib8zSP+2ji ZLlotxHfd8Sj3DOKTVfaFEK15Vmq/ugEB77l00Co4lqMe/6do9vNOq5gtKcbazBKmn/p pWDQ== 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=5VsHqSn5Cbk/FQXNI4MXwcLvmgGei3qTjeMKyPSPwP8=; b=K1gfqHwpQ6ZE1Pfhr3R6etJmYLVKvVmwf5t9psP5rb+5Ap4ZtjzsCgnTVi/oZqkuP9 xW+FQfslDWu2E6u88hIG+AuAZiQemTOaWKfpI5X6GwiOI7b8c4yvEXjIRtesCTH6+ZjF axf+ZwOlUl8X7ALPAdkjbGHFTZL4keqG5s0oNLoWiWl4VzKFLDveenMYFobXiwFuqbkK E1muBEr1vz4+544yJsMkYkWArJ5rLBrNapM9r8k7/qbiHYKgfetZ7YPbTZ53FAgt6lzG pefXLDsfOTKc8X5MYqVZkY1uACsXadFqDSi9cAKElbaszW1PpNeP8DK+jBPAoferIz4u ts0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0iJaApel; 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 g19si3362996iow.22.2021.05.20.13.22.24; Thu, 20 May 2021 13:22:37 -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=0iJaApel; 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 S239044AbhETKut (ORCPT + 99 others); Thu, 20 May 2021 06:50:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:39730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237744AbhETKf0 (ORCPT ); Thu, 20 May 2021 06:35:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A736361C5C; Thu, 20 May 2021 09:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504418; bh=3Ec7oHhQ5JY1adY4PY5OOnAqLf6BRopmE2HlCmNmsGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0iJaApelYjIu5l1OW5vwhd3uNSA4fUjo0nohlCB4yYsLQNnTceN5/wn1+WDE3+4il N+iVAEzeA0fJFxwbaBHmo+wAukkukCoXRuYQKU3gu6cK4WhkixtuKVak1VAUiAFa1J 7wNAedCnp4Jn4GDKXD3G8bayL4qGHeiQAGAlVzC0= 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.14 235/323] tipc: convert dest nodes address to network order Date: Thu, 20 May 2021 11:22:07 +0200 Message-Id: <20210520092128.219456170@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 99c69489bb44..9aa0d789d25e 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c @@ -662,7 +662,7 @@ static int tipc_nl_compat_link_dump(struct tipc_nl_compat_msg *msg, if (err) return err; - 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