From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E7A51362; Tue, 6 Dec 2022 10:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670323378; x=1701859378; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=31y31Kfr+aYyNgRZJuIfo1aOe8I3JoDh4dq09J2qISw=; b=bpY14Etfrpe1bsOOoPomCO2QryN3qppbtKjLceeRv1RjHzGlSzf6UHU/ 50P/30XTOX7K5oF4Rb1Da9qlAHrLfTSEDTlYPWZbEpqa4+dyroMLd8Sor uPggb8LtXp1i9kZVtywpMDWffwwPod+1jdMCVvsZNsToYCiDFFCc2ndxO 3brDVKaP6X5hrb00flOPRl/wShqNxuZfZc5vyRBJW3/Rq6q0HC7DimXag hmr4KwjcCGH98RmBWYEMwIdlTvqUqjhUX9HbgUxeEnwjCGdY7qfKK9DMY 4ZWiuayLC21eWRPysa3kDkcDKdvLpyu4aIrl+rf2ZtAfjRHMSSf9nt11Q g==; X-IronPort-AV: E=McAfee;i="6500,9779,10552"; a="378757236" X-IronPort-AV: E=Sophos;i="5.96,222,1665471600"; d="scan'208";a="378757236" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 02:42:57 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10552"; a="788438522" X-IronPort-AV: E=Sophos;i="5.96,222,1665471600"; d="scan'208";a="788438522" Received: from rongch2-mobl.ccr.corp.intel.com (HELO [10.254.210.59]) ([10.254.210.59]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 02:42:55 -0800 Subject: Re: net/mptcp/pm_netlink.c:1169 mptcp_pm_parse_pm_addr_attr() warn: missing error code? 'err' To: Dan Carpenter , Mat Martineau , lkp@intel.com Cc: oe-kbuild@lists.linux.dev, Florian Westphal , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, mptcp@lists.linux.dev, Matthieu Baerts References: <202212021422.Uh5cCKY2-lkp@intel.com> From: "Chen, Rong A" Message-ID: <3b6b27ec-e478-1e71-a84e-e1177827d437@intel.com> Date: Tue, 6 Dec 2022 18:42:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 12/3/2022 4:29 PM, Dan Carpenter wrote: > On Fri, Dec 02, 2022 at 03:38:01PM -0800, Mat Martineau wrote: >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1158 /* no validation needed - was already done via nested policy */ >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1159 err = nla_parse_nested_deprecated(tb, MPTCP_PM_ADDR_ATTR_MAX, attr, >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1160 mptcp_pm_addr_policy, info->extack); >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1161 if (err) >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1162 return err; >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1163 >>> 982f17ba1a2534 Florian Westphal 2022-05-03 1164 if (tb[MPTCP_PM_ADDR_ATTR_ID]) >>> 982f17ba1a2534 Florian Westphal 2022-05-03 1165 addr->id = nla_get_u8(tb[MPTCP_PM_ADDR_ATTR_ID]); >>> 982f17ba1a2534 Florian Westphal 2022-05-03 1166 >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1167 if (!tb[MPTCP_PM_ADDR_ATTR_FAMILY]) { >>> 01cacb00b35cb6 Paolo Abeni 2020-03-27 1168 if (!require_family) >>> 982f17ba1a2534 Florian Westphal 2022-05-03 @1169 return err; >>> >>> "err" is zero at this point. Presumably a negative error code was >>> intended. >> >> Hi Dan - >> >> The intended error code is 0 here: the return happens if no >> MPTCP_PM_ADDR_ATTR_FAMILY value is present and require_family is false. >> >> It would be clearer to "return 0;", but the code is working as expected. >> >> >> Could you be sure to cc mptcp@lists.linux.dev and >> matthieu.baerts@tessares.net for future MPTCP issues? Hi Mat, Sorry for the delay, we'll cc you and the mailing list in the future. Best Regards, Rong Chen > > These emails are automatically generated by the kbuild team. I don't > know what kind of heuristics they use... I've put them on the To > header. There is probably a reason why they don't just use > get_maintainer.pl... > > regards, > dan carpenter > >