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, 10 Jun 2017 23:03:54 +0100
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     Olav Haugan <ohaugan@...eaurora.org>
Cc:     catalin.marinas@....com, will.deacon@....com, robin.murphy@....com,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64/dma-mapping: Fix null-pointer check

On Sat, Jun 10, 2017 at 12:41:10PM -0700, Olav Haugan wrote:
> @@ -149,6 +140,11 @@ static void *__dma_alloc(struct device *dev, size_t size,
>  	bool coherent = is_device_dma_coherent(dev);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This re-introduces an instance that you say you're getting rid of...

>  	pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, false);
>  
> +	if (!dev) {
> +		WARN_ONCE(1, "Use an actual device structure for DMA allocation\n");
> +		return NULL;
> +	}
> +
>  	size = PAGE_ALIGN(size);
>  
>  	if (!coherent && !gfpflags_allow_blocking(flags)) {

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ