Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp462470rdb; Fri, 17 Nov 2023 04:07:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwkCWC7AMyvUE1g7AKRv3qUwTEeWViba0xIGtLe/4sqUi/p3nJtdxqa83OuqX0TzilwA9H X-Received: by 2002:a17:903:1212:b0:1cc:688e:5b1e with SMTP id l18-20020a170903121200b001cc688e5b1emr11492919plh.67.1700222823164; Fri, 17 Nov 2023 04:07:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700222823; cv=none; d=google.com; s=arc-20160816; b=ubr3t4xG4QWSfkLN8eNvkwCBljNsHrb/4dnfDv5FWovp8sbPN4gHqTSotnEisGpjcV fgcklQQo9LIVMaQtu4sFt0HyQZU1n6wa3ZOkzejWdqgWpecKqh8Ldn16tUPYAy75x/vH /OZ2PHmfSA97piVjMx61j2OS4bvPH5zONumbEu5AnVZCgrE6IDeR+kp2CDnSw7ddAlhf orFV47CbA8tc/WK2ud9UJE7YOzZKb1vfbl25sL1GzpB6FDM8Is6M4Wp0CFOxXGKeowPI SfGWVvRvNhZzyDM1ST0XCzzlmtM7nKA4HRtsp9KgrFosfhQ6KIFMgd2Uizym3dRVwmae LcEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Mh9tUJDuns9YEWMfiG7SwEu1WyJUjncM3Z8yl4XlzMU=; fh=jqWfXuUHIL8idSy4rG2qwZ/sAVSaRUVHzktujNhNa0I=; b=buu76ts1EHG3g0xV3D8PSQ2vA8XKkqOzHO4ueF1w0Z8CNbhBOabknFNY0jh1xPTg4/ 29zgzBFOIB8avRW7r+pIzOBgNsN5r1ga1Oq4XzQHLvF5sb+BxvcdOq3tqZocaBJq17OC TxETPpsNbaeMKnOOxCpdsMr+F146DG6K9joQ9sFS4KcFxJETn5NEiIa+JUE++pvF5ElS +/wfLNoQ9NgEgyzFRBvKk2uJ6KcCzKzRxN1xqGwYIlmXKfM7syVuwVMX62pb6x8MALOj U9dWS8UUNR41Yk2hp5wO86Fg1XEhdTWuBTm3ZvoI0/k1KadbqP9MqytLGuvS6zePHxdw F7Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mojatatu-com.20230601.gappssmtp.com header.s=20230601 header.b=vYIYjoYM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c15-20020a170902d48f00b001c77e00809csi1756071plg.453.2023.11.17.04.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 04:07:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@mojatatu-com.20230601.gappssmtp.com header.s=20230601 header.b=vYIYjoYM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B034081EBEB9; Fri, 17 Nov 2023 04:07:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbjKQMGx (ORCPT + 99 others); Fri, 17 Nov 2023 07:06:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKQMGw (ORCPT ); Fri, 17 Nov 2023 07:06:52 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75784B9 for ; Fri, 17 Nov 2023 04:06:49 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-5bcfc508d14so1530746a12.3 for ; Fri, 17 Nov 2023 04:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20230601.gappssmtp.com; s=20230601; t=1700222809; x=1700827609; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Mh9tUJDuns9YEWMfiG7SwEu1WyJUjncM3Z8yl4XlzMU=; b=vYIYjoYMBhkJV3wlMbdcXeamqepKwo6Rf/GK2d5aqa16B7/q9ILMimYjUcyepU0nO7 gjWkhgPY/n9JCI8bTqpAs/grCDmWAFECmW+c9uq3gKZrdz/8jEZJk253kQzx3WFrySrF HiFKH7NGCFdm1JMO50iiyjz7tUfe0zcn/NpB5Ot/ATJ9LmxI5pUN8R/2Qmv2fgSNRTiE dkzotkf/TG1NamP34jBizrrANtL339RKQ69/TC5Lx0OJ7qPFvf0YOe099RwIYL+AQ8hm HmdeHZBEL5yJhxubT+D8sQRuGBJBv6OZIeziQatCL1mgAU0GsA67FYoYKwIjXfhfve+u KBjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700222809; x=1700827609; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Mh9tUJDuns9YEWMfiG7SwEu1WyJUjncM3Z8yl4XlzMU=; b=WRVxNTclLO14mKp5sdx2A54+Ea05kKhn+kEbOKaBWXjG8M79vxNWzGVRtmPaQDW5CC ipk7rY+7UNHEZqlcF6By4a7IAHxGKZccTN+BBm+j1xsIhSpYG9lYPiOHCvOddxg74Iwp HrxO1AAIVZMocLYPp/8FhNKayq0PKIEHVESgZw9+JSx/0CTcrSGy0qLpBk+AE3EX73Jq tJvlNqt8GuvUaGGfe+ZUQFVfLcHvVSMNv8cz3C0KCrfHVLtf5wxa0YAgc5f/tpvlx41D w7uzhmlWJBQ3mqhZwfbA+D2ldwHn1nh46xKrnDD9KgpqS7TMTdZUMVUVeyfmAbuagOpX 4ksw== X-Gm-Message-State: AOJu0YxpJQ1bzVzbv0WGoLm3o+QkB8gDia9DX7BKwCiw9J/42MGTOtXG s+cdn3xZk2/7ltP2Ea+usloR3Q== X-Received: by 2002:a05:6a20:c901:b0:186:603b:6b6e with SMTP id gx1-20020a056a20c90100b00186603b6b6emr16909248pzb.17.1700222808950; Fri, 17 Nov 2023 04:06:48 -0800 (PST) Received: from ?IPV6:2804:14d:5c5e:44fb:7741:c354:44be:5c3f? ([2804:14d:5c5e:44fb:7741:c354:44be:5c3f]) by smtp.gmail.com with ESMTPSA id g31-20020a63565f000000b005891f3af36asm1262704pgm.87.2023.11.17.04.06.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Nov 2023 04:06:48 -0800 (PST) Message-ID: <16c758c6-479b-4c54-ad51-88c26a56b4c9@mojatatu.com> Date: Fri, 17 Nov 2023 09:06:45 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net: sched: Fix an endian bug in tcf_proto_create Content-Language: en-US To: Kunwu Chan , jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: kunwu.chan@hotmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231117093110.1842011-1-chentao@kylinos.cn> From: Pedro Tammela In-Reply-To: <20231117093110.1842011-1-chentao@kylinos.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 17 Nov 2023 04:07:00 -0800 (PST) On 17/11/2023 06:31, Kunwu Chan wrote: > net/sched/cls_api.c:390:22: warning: incorrect type in assignment (different base types) > net/sched/cls_api.c:390:22: expected restricted __be16 [usertype] protocol > net/sched/cls_api.c:390:22: got unsigned int [usertype] protocol > > Fixes: 33a48927c193 ("sched: push TC filter protocol creation into a separate function") > > Signed-off-by: Kunwu Chan > --- > net/sched/cls_api.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 1976bd163986..f73f39f61f66 100644 > --- a/net/sched/cls_api.c > +++ b/net/sched/cls_api.c > @@ -387,7 +387,7 @@ static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol, > goto errout; > } > tp->classify = tp->ops->classify; > - tp->protocol = protocol; > + tp->protocol = cpu_to_be16(protocol); > tp->prio = prio; > tp->chain = chain; > spin_lock_init(&tp->lock); I don't believe there's something to fix here either