Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp220248pxj; Tue, 18 May 2021 01:40:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY6xIZeD1OuC6hRmSCSTxwimwoR29Z78M1IYsvwrqeAl7vVNbxgGSfmquI+OIoDg10epoD X-Received: by 2002:a92:c884:: with SMTP id w4mr303621ilo.117.1621327203314; Tue, 18 May 2021 01:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621327203; cv=none; d=google.com; s=arc-20160816; b=v5XKDJOpPatLHJ79G0ThD127OyEMt9Q68kW38KGvkYo+Ejo4HfKVK4YWfkMkkDD2wV z3qiVc6Ha5ylJoBujJuXHgg24c35eA6Ypt6xIg/CqPn8zJOv/nllTd9yS+vVlghVtO47 W1O4ViGZXsW1a0/WGdqcgjl2rUgOQFuaLAkQymEn0sQMYdE6EBTvVjSGEWih8mzRyFVX k3o3+c2oE7XcsZ7ewrh8AhnJKsze5qYAWWHd7T2yiHpndqn05A6jMVwF2xL1mpF16fL0 pCJolp1PjYig4QbCojiLCgGyp9qs+caxhWRZwB5l0b+cVVT2ACVGtoNsmDiftYRK+t7r ZpoA== 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=XHu+ZvSG++2gFyHQIm95xOHUpBPfzs4Xe5MBuSG+JK0=; b=gHcszG8uHcMYTXkGCg3ZWwkiG1hkTykIn5JG0mJUSYSifkvPI9Tlst6r/vEGIwoQY2 xQS2XN9jLBxfMKBMAlMP5WubmBLRbC9ynL0yWB4dCQRChUa5i190klnw7PLIAqb39dt4 6soA2QBnON4ahkveQ0xZZ2xFLN80DJKAbQ66lvXxjdEx0jtau5+WonxZkl5+CPhy6GIC b2/ZQx2nKExUj6DPqNBoWxO4k4TaZsu3+6d4SAvEgRUQReI3HKBv1mu1b5sHJL7P4Dct bnDoi797POsHs8+7LieXhCA8uQBRTNBi3FYXm81jn+zYXsKmSZoTFpB5xAbRTrFiOQOg uHzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Nmbz/VGw"; 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 k8si21907915jav.68.2021.05.18.01.39.50; Tue, 18 May 2021 01:40:03 -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="Nmbz/VGw"; 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 S240308AbhEQPAq (ORCPT + 99 others); Mon, 17 May 2021 11:00:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:40386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241689AbhEQOu6 (ORCPT ); Mon, 17 May 2021 10:50:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 247766197D; Mon, 17 May 2021 14:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261399; bh=ltPnM2g22KvBxBhFEn+obnsGfdj0ICGUjMx526Tdgs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nmbz/VGw37OvggAUG80HhWDpX8DYe2yPHSMzzYvlDXLn0tE9xdPNXV9eb7ZVxIN5P y2ridEGT4gbWjJbCNcNAJ+DXR3BMCneyxmU8cr13q94en8FEAMgbcJpjkM1quK5WAr ECjsbvTmPQPw7YkfZpqWmH9IqpR0OaWdYshR3mOI= 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 5.10 016/289] tipc: convert dest nodes address to network order Date: Mon, 17 May 2021 15:59:01 +0200 Message-Id: <20210517140305.726545036@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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 1c7aa51cc2a3..49e893313652 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c @@ -693,7 +693,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