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: <20180626230057.GB17633@bombadil.infradead.org>
Date:   Tue, 26 Jun 2018 16:00:57 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Lars-Peter Clausen <lars@...afoo.de>
Cc:     linux-kernel@...r.kernel.org,
        Dan Williams <dan.j.williams@...el.com>,
        Vinod Koul <vkoul@...nel.org>, dmaengine@...r.kernel.org
Subject: Re: [PATCH 16/26] dmaengine: Convert to new IDA API

On Sun, Jun 24, 2018 at 09:57:45AM +0200, Lars-Peter Clausen wrote:
> > +	int rc = ida_alloc(&dma_ida, GFP_KERNEL);
> >  
> > +	if (rc >= 0)
> > +		device->dev_id = rc;
> >  	return rc;
> 
> This used to return 0 on success, now it returns the ID. That wont work
> considering that it is used like this
> 
>     rc = get_dma_id(device);
>     if (rc != 0) ...

Thanks!  I changed it to this:

static int get_dma_id(struct dma_device *device)
{
        int rc = ida_alloc(&dma_ida, GFP_KERNEL);

        if (rc < 0)
                return rc;
        device->dev_id = rc;
        return 0;
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ