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, 28 Apr 2018 11:36:18 -0700
From:   Michael Chan <michael.chan@...adcom.com>
To:     Zumeng Chen <zumeng.chen@...il.com>
Cc:     Netdev <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Siva Reddy Kallam <siva.kallam@...adcom.com>,
        "michael.chan@...adcom.com" <mchan@...adcom.com>,
        "prashant.sreedharan@...adcom.com" <prashant@...adcom.com>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH 1/1] tg3: fix meaningless hw_stats reading after tg3_halt
 memset 0 hw_stats

On Fri, Apr 27, 2018 at 8:15 PM, Zumeng Chen <zumeng.chen@...il.com> wrote:

> diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
> index 3b5e98e..6727d93 100644
> --- a/drivers/net/ethernet/broadcom/tg3.h
> +++ b/drivers/net/ethernet/broadcom/tg3.h
> @@ -3352,6 +3352,7 @@ struct tg3 {
>         struct pci_dev                  *pdev_peer;
>
>         struct tg3_hw_stats             *hw_stats;
> +       bool                            hw_stats_flag;

You can just add another bit to enum TG3_FLAGS for this purpose.

While this scheme will probably work, I think a better and more
elegant way to fix this is to use RCU.

>         dma_addr_t                      stats_mapping;
>         struct work_struct              reset_task;
>
> --
> 2.9.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ