Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp557188pxj; Thu, 20 May 2021 16:10:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvKCoNGmH5Br5rQHvbYa0k63bM0by/YMmgFVbBrIyMnYTfkTcJ7xkXAtrc4KAPXAb5cwQO X-Received: by 2002:a17:906:594f:: with SMTP id g15mr6888394ejr.103.1621552202705; Thu, 20 May 2021 16:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621552202; cv=none; d=google.com; s=arc-20160816; b=AxkPwg7LYG63sSDowKcccGGZD880iAqMft3YgevRy8EenD6rigCVF05F8yGRI8hcAr AJxR5t+nQRF3YzDmR9QPqa3Ho3Z5Wu3327B02yLtijkwaHqsfIaZ5S7N0NrkezOeFD9N iD3xmVPwynWcoVMGDvZ7Jllb02tu7m6oH9v8hCtpPPkOhvg1dKcbIrIuPyPHR0wBxKLq Ky4I1QnGoM3Ah1TJbSF2T2+mIqQybGgnAxNWQpiRl/V+xgTOiZ/OEVsO/5xTJOK0FMQo LWcai3DC1lud6+wgDM+MB4sKrYn36JUxqlkdOGCSotKSOL1J5m3iXv3THLg+bYi/1j8l SuCg== 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=+DrrPE2k7DVrupBBjveFwaSUuTQ0edYq+lHwxZHbKsw=; b=JVLvaR+DUavBmDCNCXOm77dvgNkX2cUKhdj0jq4dMnwZNXfbun1ZcNL+O6pPWQMsj9 hSlavxH24FEiS0L/ZARhHlSJm3lMflTFQS8Lu1tUmnjh8x7LFFcg13INUmsRyHPIWh84 U2tJGi9dOct5ypqYhKqrJHhtitiIv+iyqtIN0PNoJWocesXzD/roUzDE/tC2Jjco7dy3 1d5xzh77zVZ+dEX8uAteXGEtqC1i+o6D3CEDoS6XDyCz+Hev5Bg7gjSbR55lo3NVQh2G Ya1IaSd9NKCsRUUjjfibtdubl8phadfe24qZxDWpX9gH98Bq9Yt1B0vfUolpMjbOZNFN Hcng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NXYNuApU; 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 by9si3211738edb.20.2021.05.20.16.09.29; Thu, 20 May 2021 16:10:02 -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=NXYNuApU; 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 S241054AbhETLUC (ORCPT + 99 others); Thu, 20 May 2021 07:20:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:57140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239615AbhETK75 (ORCPT ); Thu, 20 May 2021 06:59:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D3F16191B; Thu, 20 May 2021 10:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504987; bh=G18zAJ0sFxh+NmeDjHTdQ79eULCmNSwBL+Zf8YNxtlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NXYNuApUzrbSD8cpdTpx5rXfNgLAKOSPPJrWlJ9TEsbcjaCftButhCuXdH0gqeRz3 rPlhd4l8DQcIUvtOQVBE+xSxWjjRkFigEFP8/5oNyL5dFz5gyZKt6I+SIVAGm2U/yR ZT4wNcjbirr6qROKJc6SRcVbHEjoZHdh3o1rRaP0= 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.9 171/240] tipc: convert dest nodes address to network order Date: Thu, 20 May 2021 11:22:43 +0200 Message-Id: <20210520092114.394547985@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092108.587553970@linuxfoundation.org> References: <20210520092108.587553970@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 403be9bfd8d1..69151de9657c 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