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]
Message-ID: <CANX6Dak5pFutKVn7hV_8-tYx4h67-gS2ud=CrArN--9e=ica5Q@mail.gmail.com>
Date:	Wed, 7 Nov 2012 16:42:09 +0530
From:	Viral Mehta <viral.vkm@...il.com>
To:	Vipul Pandya <vipul@...lsio.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	divy@...lsio.com, dm@...lsio.com, Jay Hernandez <jay@...lsio.com>
Subject: Re: [PATCH net] cxgb4: Initialize data structures before using.

Hi,

On Tue, Nov 6, 2012 at 7:07 PM, Vipul Pandya <vipul@...lsio.com> wrote:
>
> We should not assume reserve fields to be don't cares as fields may change.
> Clearing data structures before using.
>
> Signed-off-by: Jay Hernandez <jay@...lsio.com>
> Signed-off-by: Vipul Pandya <vipul@...lsio.com>
> ---
>  drivers/net/ethernet/chelsio/cxgb4/t4_hw.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> index 32eec15..01fa5b7 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> @@ -2519,6 +2519,7 @@ int t4_fw_bye(struct adapter *adap, unsigned int mbox)
>  {
>         struct fw_bye_cmd c;
>
> +       memset(&c, 0, sizeof(c));

struct fw_byte_cmd c = {0};

Isn't it better ?

Thanks,
Viral
--
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