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: <tencent_2CE7124212471D7F3E9CA16E@qq.com>
Date:   Mon, 13 Nov 2017 16:37:09 +0800
From:   "陈华才" <chenhc@...ote.com>
To:     "Christoph Hellwig" <hch@....de>
Cc:     "Christoph Hellwig" <hch@....de>,
        "Marek Szyprowski" <m.szyprowski@...sung.com>,
        "Robin Murphy" <robin.murphy@....com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Fuxin Zhang" <zhangfx@...ote.com>,
        "linux-kernel" <linux-kernel@...r.kernel.org>,
        "Ralf Baechle" <ralf@...ux-mips.org>,
        "James Hogan" <james.hogan@...tec.com>,
        "linux-mips" <linux-mips@...ux-mips.org>,
        "James E . J . Bottomley" 
        <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" 
        <martin.petersen@...cle.com>,
        "linux-scsi" <linux-scsi@...r.kernel.org>,
        "stable" <stable@...r.kernel.org>,
        "Michael S . Tsirkin" <mst@...hat.com>,
        "Pawel Osciak" <pawel@...iak.com>,
        "Kyungmin Park" <kyungmin.park@...sung.com>,
        "Michael Chan" <michael.chan@...adcom.com>,
        "Benjamin Herrenschmidt" 
        <benh@...nel.crashing.org>,
        "Ivan Mikhaylov" <ivan@...ibm.com>,
        "Tariq Toukan" <tariqt@...lanox.com>,
        "Andy Gross" <agross@...eaurora.org>,
        "Mark A . Greer" <mgreer@...malcreek.com>,
        "Robert Baldyga" <r.baldyga@...kerion.com>
Subject: Re: [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()

But in b44_init(), there is no device instances.
 
 
 
------------------ Original ------------------
From:  "Christoph Hellwig"<hch@....de>;
Date:  Fri, Nov 10, 2017 08:30 PM
To:  "Huacai Chen"<chenhc@...ote.com>; 
Cc:  "Christoph Hellwig"<hch@....de>; "Marek Szyprowski"<m.szyprowski@...sung.com>; "Robin Murphy"<robin.murphy@....com>; "Andrew Morton"<akpm@...ux-foundation.org>; "Fuxin Zhang"<zhangfx@...ote.com>; "linux-kernel"<linux-kernel@...r.kernel.org>; "Ralf Baechle"<ralf@...ux-mips.org>; "James Hogan"<james.hogan@...tec.com>; "linux-mips"<linux-mips@...ux-mips.org>; "James E . J . Bottomley"<jejb@...ux.vnet.ibm.com>; "Martin K . Petersen"<martin.petersen@...cle.com>; "linux-scsi"<linux-scsi@...r.kernel.org>; "stable"<stable@...r.kernel.org>; "Michael S . Tsirkin"<mst@...hat.com>; "Pawel Osciak"<pawel@...iak.com>; "Kyungmin Park"<kyungmin.park@...sung.com>; "Michael Chan"<michael.chan@...adcom.com>; "Benjamin Herrenschmidt"<benh@...nel.crashing.org>; "Ivan Mikhaylov"<ivan@...ibm.com>; "Tariq Toukan"<tariqt@...lanox.com>; "Andy Gross"<agross@...eaurora.org>; "Mark A . Greer"<mgreer@...malcreek.com>; "Robert Baldyga"<r.baldyga@...kerion.com>; 
Subject:  Re: [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()

 
> diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
> index a1125d1..2f6ffe5 100644
> --- a/drivers/net/ethernet/broadcom/b44.c
> +++ b/drivers/net/ethernet/broadcom/b44.c
> @@ -2344,6 +2344,10 @@ static int b44_init_one(struct ssb_device *sdev,
>  	struct net_device *dev;
>  	struct b44 *bp;
>  	int err;
> +	unsigned int dma_desc_align_size = dma_get_cache_alignment(sdev->dma_dev);
> +
> +	/* Setup paramaters for syncing RX/TX DMA descriptors */
> +	dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
>  
>  	instance++;
>  
> @@ -2587,12 +2591,8 @@ static inline void b44_pci_exit(void)
>  
>  static int __init b44_init(void)
>  {
> -	unsigned int dma_desc_align_size = dma_get_cache_alignment();
>  	int err;
>  
> -	/* Setup paramaters for syncing RX/TX DMA descriptors */
> -	dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
> -

This looks wrong - you override a global variable for each probed
device.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ