From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3861CA0EC3 for ; Tue, 12 Sep 2023 12:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbjILMHo (ORCPT ); Tue, 12 Sep 2023 08:07:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234489AbjILMH3 (ORCPT ); Tue, 12 Sep 2023 08:07:29 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D7A10D0; Tue, 12 Sep 2023 05:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=sgzBNOAWFKoowxyC05sVul7gVRvqwao9EVd/Og49pRU=; b=yEDTjDA8sU308ewOW6gaFkgd3x z2OoyevlGR5HvPphDokC2bAd7+BgOjgTEvEbiI8ppMW2JrVgsEZrfzpPLpMoG7X3DCL9pvdf0rYfx bPxKLw1PSSktabPZS1LvNNMUUPNkEalgo4vcOJ+VyweygvRIDSnYG/+8fQEvvGkbrveE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qg2Ag-006Dqs-BU; Tue, 12 Sep 2023 14:07:10 +0200 Date: Tue, 12 Sep 2023 14:07:10 +0200 From: Andrew Lunn To: Parthiban Veerasooran Cc: kuba@kernel.org, piergiorgio.beruto@gmail.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horatiu.vultur@microchip.com, Woojung.Huh@microchip.com, Nicolas.Ferre@microchip.com, Thorsten.Kummermehr@microchip.com, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net v2] ethtool: plca: fix plca enable data type while parsing the value Message-ID: References: <20230908044548.5878-1-Parthiban.Veerasooran@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230908044548.5878-1-Parthiban.Veerasooran@microchip.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 08, 2023 at 10:15:48AM +0530, Parthiban Veerasooran wrote: > The ETHTOOL_A_PLCA_ENABLED data type is u8. But while parsing the > value from the attribute, nla_get_u32() is used in the plca_update_sint() > function instead of nla_get_u8(). So plca_cfg.enabled variable is updated > with some garbage value instead of 0 or 1 and always enables plca even > though plca is disabled through ethtool application. This bug has been > fixed by parsing the values based on the attributes type in the policy. > > Fixes: 8580e16c28f3 ("net/ethtool: add netlink interface for the PLCA RS") > Signed-off-by: Parthiban Veerasooran Reviewed-by: Andrew Lunn Andrew