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]
Date:	Tue, 17 Sep 2013 15:28:55 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	or.gerlitz@...il.com
Cc:	prarit@...hat.com, jackm@....mellanox.co.il,
	netdev@...r.kernel.org, dledford@...hat.com, amirv@...lanox.com,
	ogerlitz@...lanox.com
Subject: Re: [PATCH 2/2] Re: net, mellanox mlx4 Fix compile warnings

From: Or Gerlitz <or.gerlitz@...il.com>
Date: Tue, 17 Sep 2013 22:25:57 +0300

> On Tue, Sep 17, 2013 at 10:13 PM, Prarit Bhargava <prarit@...hat.com> wrote:
>> Fix unitialized variable warnings.
>>
>> 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);
>>
>> [v2]: davem suggested making cq_res_start_move_to() return 'cq' as an error
>> pointer instead of setting 'cq' by reference.  I also did the same for srq.
> 
> Pravit, as I wrote you earlier on this thread, Jack from our team
> maintains this piece (SRIOV resource tracker) of the mlx4 core driver
> code, so I am adding him. Dave, as many of us here he might be OOO for
> the coming ten days for holiday vacation, so would ask you to please
> wait patiently for his ack/nak...

I already stated that I wanted this issue fixed differently.

Specifically I said that these functions should return error pointers,
instead of trying to return an integer error whilst setting the cq
pointer by reference.

This is a method which is idiomatic and common across the kernel, and
is the preferred way to handle this kind of situation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ