lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Jun 2022 01:17:38 +0000
From:   Peng Fan <peng.fan@....com>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        "Peng Fan (OSS)" <peng.fan@....nxp.com>
CC:     "djakov@...nel.org" <djakov@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>, Abel Vesa <abel.vesa@....com>,
        "abailon@...libre.com" <abailon@...libre.com>,
        "l.stach@...gutronix.de" <l.stach@...gutronix.de>,
        "marex@...x.de" <marex@...x.de>,
        "paul.elder@...asonboard.com" <paul.elder@...asonboard.com>,
        "Markus.Niebel@...tq-group.com" <Markus.Niebel@...tq-group.com>,
        "aford173@...il.com" <aford173@...il.com>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH 3/8] interconnect: imx: fix max_node_id

> Subject: Re: [PATCH 3/8] interconnect: imx: fix max_node_id
> 
> Hi Peng,
> 
> Thank you for the patch.
> 
> On Wed, Jun 01, 2022 at 05:41:51PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@....com>
> >
> > max_node_id not equal to the ARRAY_SIZE of node array, need increase
> > 1, otherwise xlate will fail for the last entry.
> >
> > Fixes: f0d8048525d7d("interconnect: Add imx core driver")
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> >  drivers/interconnect/imx/imx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/interconnect/imx/imx.c
> > b/drivers/interconnect/imx/imx.c index 249ca25d1d55..3c074933ed0c
> > 100644
> > --- a/drivers/interconnect/imx/imx.c
> > +++ b/drivers/interconnect/imx/imx.c
> > @@ -238,7 +238,7 @@ int imx_icc_register(struct platform_device *pdev,
> >  	int ret;
> >
> >  	/* icc_onecell_data is indexed by node_id, unlike nodes param */
> > -	max_node_id = get_max_node_id(nodes, nodes_count);
> > +	max_node_id = get_max_node_id(nodes, nodes_count) + 1;
> 
> I'd rename the max_node_id variable to num_nodes, as writing
> 
> 	max_node_id = get_max_node_id(...) + 1;
> 
> looks weird.

Thanks, will follow your suggestion in V2.

Thanks,
Peng.

> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> 
> >  	data = devm_kzalloc(dev, struct_size(data, nodes, max_node_id),
> >  			    GFP_KERNEL);
> >  	if (!data)
> 
> --
> Regards,
> 
> Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ