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] [day] [month] [year] [list]
Message-ID:
 <PH7PR12MB590362C95F9FA2AA14BDF849C09E2@PH7PR12MB5903.namprd12.prod.outlook.com>
Date: Fri, 6 Sep 2024 19:26:20 +0000
From: Yevgeny Kliteynik <kliteyn@...dia.com>
To: Simon Horman <horms@...nel.org>, Saeed Mahameed <saeed@...nel.org>
CC: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, Saeed
 Mahameed <saeedm@...dia.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, Tariq Toukan <tariqt@...dia.com>, Gal Pressman
	<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Itamar Gozlan
	<igozlan@...dia.com>, Mark Bloch <mbloch@...dia.com>
Subject: RE: [net-next V2 11/15] net/mlx5: HWS, added memory management
 handling

> -----Original Message-----
> From: Simon Horman <horms@...nel.org>
> 
> 
> > +static struct mlx5hws_pool_resource *
> > +hws_pool_create_one_resource(struct mlx5hws_pool *pool, u32
> log_range,
> > +                          u32 fw_ft_type)
> > +{
> > +     struct mlx5hws_cmd_ste_create_attr ste_attr;
> > +     struct mlx5hws_cmd_stc_create_attr stc_attr;
> > +     struct mlx5hws_pool_resource *resource;
> > +     u32 obj_id;
> > +     int ret;
> > +
> > +     resource = kzalloc(sizeof(*resource), GFP_KERNEL);
> > +     if (!resource)
> > +             return NULL;
> > +
> > +     switch (pool->type) {
> > +     case MLX5HWS_POOL_TYPE_STE:
> > +             ste_attr.log_obj_range = log_range;
> > +             ste_attr.table_type = fw_ft_type;
> > +             ret = mlx5hws_cmd_ste_create(pool->ctx->mdev, &ste_attr, &obj_id);
> > +             break;
> > +     case MLX5HWS_POOL_TYPE_STC:
> > +             stc_attr.log_obj_range = log_range;
> > +             stc_attr.table_type = fw_ft_type;
> > +             ret = mlx5hws_cmd_stc_create(pool->ctx->mdev, &stc_attr, &obj_id);
> > +             break;
> > +     default:
> 
> Hi Saeed and Yevgeny,
> 
> Another minor nit from my side (I think this is the last one).
> 
> If we get here, then ret will be used uninitialised by the if condition below.
> 
> Also flagged by Smatch.

Thanks Simon, fixing this as well in V3.

-- YK



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ