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:	Sat, 14 Sep 2013 22:10:19 +0300
From:	Or Gerlitz <or.gerlitz@...il.com>
To:	Prarit Bhargava <prarit@...hat.com>,
	Jack Morgenstein <jackm@....mellanox.co.il>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Doug Ledford <dledford@...hat.com>,
	Amir Vadai <amirv@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>
Subject: Re: [PATCH] net, mellanox mlx4 Fix compile warnings

On Fri, Sep 13, 2013 at 3:30 PM, Prarit Bhargava <prarit@...hat.com> wrote:
> Fix unitialized variable warnings.

Hi,

I'd like Jack, who is in charge on this code to take a look, added him.

Or.

>
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_HW2SW_CQ_wrapper’:
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2551:16: error: ‘cq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   atomic_dec(&cq->mtt->ref_count);
>                 ^
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_HW2SW_SRQ_wrapper’:
> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2734:17: error: ‘srq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   atomic_dec(&srq->mtt->ref_count);
>
> Signed-off-by: Prarit Bhargava <prarit@...hat.com>
> Cc: dledford@...hat.com
> Cc: Amir Vadai <amirv@...lanox.com>
> Cc: Or Gerlitz <ogerlitz@...lanox.com>
> ---
>  .../net/ethernet/mellanox/mlx4/resource_tracker.c  |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> index dd68763..d703838 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> @@ -2563,7 +2563,7 @@ int mlx4_HW2SW_CQ_wrapper(struct mlx4_dev *dev, int slave,
>  {
>         int err;
>         int cqn = vhcr->in_modifier;
> -       struct res_cq *cq;
> +       struct res_cq *uninitialized_var(cq);
>
>         err = cq_res_start_move_to(dev, slave, cqn, RES_CQ_ALLOCATED, &cq);
>         if (err)
> @@ -2746,7 +2746,7 @@ int mlx4_HW2SW_SRQ_wrapper(struct mlx4_dev *dev, int slave,
>  {
>         int err;
>         int srqn = vhcr->in_modifier;
> -       struct res_srq *srq;
> +       struct res_srq *uninitialized_var(srq);
>
>         err = srq_res_start_move_to(dev, slave, srqn, RES_SRQ_ALLOCATED, &srq);
>         if (err)
> --
> 1.7.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ