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: <CANO=VFGp16PAD15k4JUZrnpGRdARcaJFUe=mLQTJrGdXZh8_8g@mail.gmail.com>
Date:	Wed, 27 Apr 2016 10:06:18 +0300
From:	Haggai Abramovsky <haggaia.linux@...il.com>
To:	leon@...nel.org
Cc:	Haggai Abramovsky <hagaya@...lanox.com>,
	"David S. Miller" <davem@...emloft.net>,
	Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
	netdev@...r.kernel.org, Sinan Kaya <okaya@...eaurora.org>,
	Timur Tabi <timur@...eaurora.org>,
	Eli Cohen <eli@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Eran Ben Elisha <eranbe@...lanox.com>,
	Yishai Hadas <yishaih@...lanox.com>,
	Tal Alon <talal@...lanox.com>,
	Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH net] net/mlx4: Avoid wrong virtual mappings

On Wed, Apr 27, 2016 at 9:32 AM, Leon Romanovsky <leon@...nel.org> wrote:
> On Mon, Apr 25, 2016 at 04:34:47PM +0300, Haggai Abramovsky wrote:
>> -int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
>> -                struct mlx4_buf *buf, gfp_t gfp)
>> +static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size,
>> +                              struct mlx4_buf *buf, gfp_t gfp)
>>  {
>> -     dma_addr_t t;
>> +             dma_addr_t t;
>>
>
> You have wrong indentation in whole this function.

Thanks, I will fix this and send v1.

>
>> -     if (size <= max_direct) {
>>               buf->nbufs        = 1;
>>               buf->npages       = 1;
>>               buf->page_shift   = get_order(size) + PAGE_SHIFT;
>> -             buf->direct.buf   = dma_alloc_coherent(&dev->persist->pdev->dev,
>> -                                                    size, &t, gfp);
>> +             buf->direct.buf   =
>> +                     dma_zalloc_coherent(&dev->persist->pdev->dev,
>> +                                         size, &t, gfp);
>>               if (!buf->direct.buf)
>>                       return -ENOMEM;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ